diff options
Diffstat (limited to 'util-linux/getopt.c')
-rw-r--r-- | util-linux/getopt.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 2390f30..e126d7b 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c @@ -92,8 +92,7 @@ const char *normalize(const char *arg) const char *argptr=arg; char *bufptr; - if (BUFFER != NULL) - free(BUFFER); + free(BUFFER); if (!quote) { /* Just copy arg */ BUFFER=xstrdup(arg); @@ -340,16 +339,14 @@ int getopt_main(int argc, char *argv[]) alternative=1; break; case 'o': - if (optstr) - free(optstr); + free(optstr); optstr=xstrdup(optarg); break; case 'l': add_long_options(optarg); break; case 'n': - if (name) - free(name); + free(name); name=xstrdup(optarg); break; case 'q': |