diff options
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r-- | util-linux/getopt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index bdf5f9716..25aa4069a 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 | |||
238 | if (tlen == 0) | 238 | if (tlen == 0) |
239 | bb_error_msg_and_die("empty long option specified"); | 239 | bb_error_msg_and_die("empty long option specified"); |
240 | } | 240 | } |
241 | long_options = xrealloc(long_options, | 241 | //TODO: zeroing version of xrealloc_vector! |
242 | sizeof(long_options[0]) * (long_nr+2)); | 242 | long_options = xrealloc_vector(long_options, 4, long_nr); |
243 | long_options[long_nr].has_arg = arg_opt; | 243 | long_options[long_nr].has_arg = arg_opt; |
244 | long_options[long_nr].flag = NULL; | 244 | long_options[long_nr].flag = NULL; |
245 | long_options[long_nr].val = LONG_OPT; | 245 | long_options[long_nr].val = LONG_OPT; |