diff options
author | Miles Bader <miles@gnu.org> | 1995-11-14 23:35:16 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 1995-11-14 23:35:16 +0000 |
commit | d5c1a156fae5fc334f009f4a9b8d3cb06e3b9efe (patch) | |
tree | 99439ff87890e60045f011c18a3b72aae0f5513e /utils | |
parent | 6b5139be2a99e143e61d0f86cd837966f01214e1 (diff) |
(main): Grow TTY_NAMES properly even when it's empty.
Diffstat (limited to 'utils')
-rw-r--r-- | utils/ps.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -434,7 +434,7 @@ main(int argc, char *argv[]) { if (tty_names_alloced == num_tty_names) { - tty_names_alloced *= 2; + tty_names_alloced += tty_names_alloced + 1; tty_names = realloc(tty_names, tty_names_alloced * sizeof(int)); if (tty_names == NULL) error(8, ENOMEM, "Can't allocate tty_name list"); |