From d4004ee6a933eaf3d3843624d8c63e922db8d7dd Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Tue, 14 Sep 2004 17:24:59 +0000 Subject: Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also. --- util-linux/getopt.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'util-linux') 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; -- cgit v1.1