summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-11-08 01:20:25 +0000
committerMiles Bader <miles@gnu.org>1995-11-08 01:20:25 +0000
commit20c1bca35cdbfd0456326ddce329361fad8f627b (patch)
tree43d882810ab929fc7e863ee0b39894c744d98cc9 /utils
parent8d9c185666cd7e521fc55b4af567324c0dcb94f5 (diff)
(ids_add): Increase the size of IDS even when 0.
Diffstat (limited to 'utils')
-rw-r--r--utils/ps.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/ps.c b/utils/ps.c
index f604600b..344e6863 100644
--- a/utils/ps.c
+++ b/utils/ps.c
@@ -328,7 +328,7 @@ ids_add (struct ids *ids, id_t id)
{
if (ids->alloced == ids->num)
{
- ids->alloced *= 2;
+ ids->alloced = ids->alloced * 2 + 1;
ids->ids = realloc (ids->ids, ids->alloced * sizeof (id_t));
if (ids->ids == NULL)
error(8, ENOMEM, "Can't allocate id list");