svn commit: trunk/busybox: findutils init networking shell
vda at busybox.net
vda at busybox.net
Sat Feb 3 03:31:14 UTC 2007
Author: vda
Date: 2007-02-02 19:31:13 -0800 (Fri, 02 Feb 2007)
New Revision: 17735
Log:
assorted fixes for bugs found with randomconfig
Modified:
trunk/busybox/findutils/find.c
trunk/busybox/init/init.c
trunk/busybox/networking/ether-wake.c
trunk/busybox/networking/ping.c
trunk/busybox/shell/hush.c
Changeset:
Modified: trunk/busybox/findutils/find.c
===================================================================
--- trunk/busybox/findutils/find.c 2007-02-03 02:42:47 UTC (rev 17734)
+++ trunk/busybox/findutils/find.c 2007-02-03 03:31:13 UTC (rev 17735)
@@ -316,12 +316,15 @@
}
#endif
+#if ENABLE_FEATURE_FIND_PERM || ENABLE_FEATURE_FIND_MTIME \
+ || ENABLE_FEATURE_FIND_MMIN
static const char* plus_minus_num(const char* str)
{
if (*str == '-' || *str == '+')
str++;
return str;
}
+#endif
static action*** parse_params(char **argv)
{
@@ -486,7 +489,7 @@
ap->subst_count[i] = count_subst(ap->exec_argv[i]);
}
#endif
-#ifdef ENABLE_FEATURE_FIND_USER
+#if ENABLE_FEATURE_FIND_USER
else if (strcmp(arg, "-user") == 0) {
action_user *ap;
if (!*++argv)
Modified: trunk/busybox/init/init.c
===================================================================
--- trunk/busybox/init/init.c 2007-02-03 02:42:47 UTC (rev 17734)
+++ trunk/busybox/init/init.c 2007-02-03 03:31:13 UTC (rev 17735)
@@ -122,7 +122,7 @@
static char console[CONSOLE_BUFF_SIZE] = CONSOLE_DEV;
#if !ENABLE_SYSLOGD
-static char *log_console = VC_5;
+static const char *log_console = VC_5;
#endif
#if !ENABLE_DEBUG_INIT
static sig_atomic_t got_cont = 0;
Modified: trunk/busybox/networking/ether-wake.c
===================================================================
--- trunk/busybox/networking/ether-wake.c 2007-02-03 02:42:47 UTC (rev 17734)
+++ trunk/busybox/networking/ether-wake.c 2007-02-03 03:31:13 UTC (rev 17735)
@@ -107,7 +107,8 @@
int ether_wake_main(int argc, char *argv[])
{
- char *ifname = "eth0", *pass = NULL;
+ const char *ifname = "eth0";
+ char *pass = NULL;
unsigned long flags;
unsigned char wol_passwd[6];
int wol_passwd_sz = 0;
Modified: trunk/busybox/networking/ping.c
===================================================================
--- trunk/busybox/networking/ping.c 2007-02-03 02:42:47 UTC (rev 17734)
+++ trunk/busybox/networking/ping.c 2007-02-03 03:31:13 UTC (rev 17735)
@@ -190,7 +190,7 @@
len_and_sockaddr *lsa;
#if ENABLE_PING6
sa_family_t af = AF_UNSPEC;
- while (++argv[0][0]) == '-') {
+ while (++argv[0][0] == '-') {
if (argv[0][1] == '4') {
af = AF_INET;
continue;
Modified: trunk/busybox/shell/hush.c
===================================================================
--- trunk/busybox/shell/hush.c 2007-02-03 02:42:47 UTC (rev 17734)
+++ trunk/busybox/shell/hush.c 2007-02-03 03:31:13 UTC (rev 17735)
@@ -2795,8 +2795,8 @@
}
debug_printf("\nrunning script '%s'\n", argv[optind]);
- global_argv = argv+optind;
- global_argc = argc-optind;
+ global_argv = argv + optind;
+ global_argc = argc - optind;
input = xfopen(argv[optind], "r");
opt = parse_file_outer(input);
@@ -2809,8 +2809,8 @@
for (cur = top_vars; cur; cur = tmp) {
tmp = cur->next;
if (!cur->flg_read_only) {
- free(cur->name);
- free(cur->value);
+ free((char*)cur->name);
+ free((char*)cur->value);
free(cur);
}
}
More information about the busybox-cvs
mailing list