summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorGlenn L McGrath2004-09-14 17:24:59 +0000
committerGlenn L McGrath2004-09-14 17:24:59 +0000
commitd4004ee6a933eaf3d3843624d8c63e922db8d7dd (patch)
treecef7a75838b66f62fb18c2b0f2479d29ce0422ba /util-linux
parentab1955c2367d18e25fde1791a2660ae69976c623 (diff)
downloadbusybox-d4004ee6a933eaf3d3843624d8c63e922db8d7dd.zip
busybox-d4004ee6a933eaf3d3843624d8c63e922db8d7dd.tar.gz
Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also.
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/getopt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/util-linux/getopt.c b/util-linux/getopt.c
index e3b0513..032d0dc 100644
--- a/util-linux/getopt.c
+++ b/util-linux/getopt.c
@@ -305,8 +305,8 @@ static const char *shortopts="+ao:l:n:qQs:Tu";
int getopt_main(int argc, char *argv[])
{
- char *optstr=NULL;
- char *name=NULL;
+ const char *optstr = NULL;
+ const char *name = NULL;
int opt;
int compatible=0;
@@ -340,14 +340,14 @@ int getopt_main(int argc, char *argv[])
break;
case 'o':
free(optstr);
- optstr=bb_xstrdup(optarg);
+ optstr = optarg;
break;
case 'l':
add_long_options(optarg);
break;
case 'n':
free(name);
- name=bb_xstrdup(optarg);
+ name = optarg;
break;
case 'q':
quiet_errors=1;