summaryrefslogtreecommitdiff
path: root/procps/ps.c
diff options
context:
space:
mode:
Diffstat (limited to 'procps/ps.c')
-rw-r--r--procps/ps.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/procps/ps.c b/procps/ps.c
index c5dff18..d7ea9fb 100644
--- a/procps/ps.c
+++ b/procps/ps.c
@@ -303,9 +303,8 @@ static const ps_out_t out_spec[] = {
static ps_out_t* new_out_t(void)
{
- int i = out_cnt++;
- out = xrealloc(out, out_cnt * sizeof(*out));
- return &out[i];
+ out = xrealloc_vector(out, 2, out_cnt);
+ return &out[out_cnt++];
}
static const ps_out_t* find_out_spec(const char *name)