[BusyBox-cvs] CVS busybox/util-linux

CVS User bug1 bug1 at codepoet.org
Tue Sep 14 17:24:59 UTC 2004


Update of /var/cvs/busybox/util-linux
In directory nail:/tmp/cvs-serv24804/util-linux

Modified Files:
	getopt.c 
Log Message:
Patch from Felipe Kellermann, remove some unnecessary dups, i declared a few extra const's also.


--- /var/cvs/busybox/util-linux/getopt.c	2004/04/14 17:51:38	1.13
+++ /var/cvs/busybox/util-linux/getopt.c	2004/09/14 17:24:59	1.14
@@ -305,8 +305,8 @@
 
 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 @@
                         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;



More information about the busybox-cvs mailing list