diff options
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r-- | util-linux/getopt.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index fab8f8398..bf05f9164 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c | |||
@@ -31,14 +31,8 @@ | |||
31 | * | 31 | * |
32 | */ | 32 | */ |
33 | 33 | ||
34 | #include <stdio.h> | ||
35 | #include <stdlib.h> | ||
36 | #include <string.h> | ||
37 | #include <unistd.h> | ||
38 | #include <ctype.h> | ||
39 | #include <getopt.h> | ||
40 | |||
41 | #include "busybox.h" | 34 | #include "busybox.h" |
35 | #include <getopt.h> | ||
42 | 36 | ||
43 | /* NON_OPT is the code that is returned when a non-option is found in '+' | 37 | /* NON_OPT is the code that is returned when a non-option is found in '+' |
44 | mode */ | 38 | mode */ |
@@ -86,7 +80,7 @@ const char *normalize(const char *arg) | |||
86 | free(BUFFER); | 80 | free(BUFFER); |
87 | 81 | ||
88 | if (!quote) { /* Just copy arg */ | 82 | if (!quote) { /* Just copy arg */ |
89 | BUFFER=bb_xstrdup(arg); | 83 | BUFFER=xstrdup(arg); |
90 | return BUFFER; | 84 | return BUFFER; |
91 | } | 85 | } |
92 | 86 | ||
@@ -215,7 +209,7 @@ void add_longopt(const char *name,int has_arg) | |||
215 | long_options[long_options_nr-1].has_arg=has_arg; | 209 | long_options[long_options_nr-1].has_arg=has_arg; |
216 | long_options[long_options_nr-1].flag=NULL; | 210 | long_options[long_options_nr-1].flag=NULL; |
217 | long_options[long_options_nr-1].val=LONG_OPT; | 211 | long_options[long_options_nr-1].val=LONG_OPT; |
218 | long_options[long_options_nr-1].name=bb_xstrdup(name); | 212 | long_options[long_options_nr-1].name=xstrdup(name); |
219 | } | 213 | } |
220 | long_options_nr++; | 214 | long_options_nr++; |
221 | } | 215 | } |