summaryrefslogtreecommitdiff
path: root/util-linux/getopt.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r--util-linux/getopt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index bdf5f97..25aa406 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -238,8 +238,8 @@ static struct option *add_long_options(struct option *long_options, char *option
if (tlen == 0)
bb_error_msg_and_die("empty long option specified");
}
- long_options = xrealloc(long_options,
- sizeof(long_options[0]) * (long_nr+2));
+//TODO: zeroing version of xrealloc_vector!
+ long_options = xrealloc_vector(long_options, 4, long_nr);
long_options[long_nr].has_arg = arg_opt;
long_options[long_nr].flag = NULL;
long_options[long_nr].val = LONG_OPT;