diff options
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r-- | util-linux/getopt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 25aa4069a..402630385 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
@@ -238,14 +238,13 @@ 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 | //TODO: zeroing version of xrealloc_vector! | ||
242 | long_options = xrealloc_vector(long_options, 4, long_nr); | 241 | long_options = xrealloc_vector(long_options, 4, long_nr); |
243 | long_options[long_nr].has_arg = arg_opt; | 242 | long_options[long_nr].has_arg = arg_opt; |
244 | long_options[long_nr].flag = NULL; | 243 | /*long_options[long_nr].flag = NULL; - xrealloc_vector did it */ |
245 | long_options[long_nr].val = LONG_OPT; | 244 | long_options[long_nr].val = LONG_OPT; |
246 | long_options[long_nr].name = xstrdup(tokptr); | 245 | long_options[long_nr].name = xstrdup(tokptr); |
247 | long_nr++; | 246 | long_nr++; |
248 | memset(&long_options[long_nr], 0, sizeof(long_options[0])); | 247 | /*memset(&long_options[long_nr], 0, sizeof(long_options[0])); - xrealloc_vector did it */ |
249 | } | 248 | } |
250 | tokptr = strtok(NULL, ", \t\n"); | 249 | tokptr = strtok(NULL, ", \t\n"); |
251 | } | 250 | } |