[BusyBox-cvs] busybox/applets busybox.c,1.139,1.140
Glenn McGrath
bug1 at busybox.net
Fri Oct 3 03:25:33 UTC 2003
Update of /var/cvs/busybox/applets
In directory winder:/tmp/cvs-serv376/applets
Modified Files:
busybox.c
Log Message:
Patch from Rob Landley, Simplify organisation of arguments.
Index: busybox.c
===================================================================
RCS file: /var/cvs/busybox/applets/busybox.c,v
retrieving revision 1.139
retrieving revision 1.140
diff -u -d -r1.139 -r1.140
--- busybox.c 19 Mar 2003 09:11:13 -0000 1.139
+++ busybox.c 3 Oct 2003 03:25:30 -0000 1.140
@@ -98,7 +98,7 @@
int busybox_main(int argc, char **argv)
{
- int col = 0, len, i;
+ int col = 0;
#ifdef CONFIG_FEATURE_INSTALLER
/*
@@ -161,18 +161,7 @@
/* Flag that we've been here already */
been_there_done_that = 1;
- /* Move the command line down a notch */
- len = argv[argc] + strlen(argv[argc]) - argv[1];
- memmove(argv[0], argv[1], len);
- memset(argv[0] + len, 0, argv[1] - argv[0]);
-
- /* Fix up the argv pointers */
- len = argv[1] - argv[0];
- memmove(argv, argv + 1, sizeof(char *) * (argc + 1));
- for (i = 0; i < argc; i++)
- argv[i] -= len;
-
- return (main(argc, argv));
+ return (main(argc-1, argv+1));
}
/*
More information about the busybox-cvs
mailing list