diff options
author | Aaron Lehmann | 2002-11-28 11:27:31 +0000 |
---|---|---|
committer | Aaron Lehmann | 2002-11-28 11:27:31 +0000 |
commit | a170e1c858d35c474ceb9fecb41b37d681424094 (patch) | |
tree | cda2b13f10ca1ab0a3559d4b6ff663ed20d7106c /util-linux/getopt.c | |
parent | 1652855fbc830f41c7ee56ece1a30b328c4fb395 (diff) | |
download | busybox-a170e1c858d35c474ceb9fecb41b37d681424094.zip busybox-a170e1c858d35c474ceb9fecb41b37d681424094.tar.gz |
Change if(x)free(x); to free(x);
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': |