diff options
author | Eric Andersen | 2001-10-18 04:04:34 +0000 |
---|---|---|
committer | Eric Andersen | 2001-10-18 04:04:34 +0000 |
commit | 11fdb8a4c79752157a8263fbcf583916d5ec0347 (patch) | |
tree | a59376401e4f839f9cbd8538bd7caa2d0dd3658f /init | |
parent | 1bf25f030777a83ed498914ad65ba3d44b8b3fdc (diff) | |
download | busybox-11fdb8a4c79752157a8263fbcf583916d5ec0347.zip busybox-11fdb8a4c79752157a8263fbcf583916d5ec0347.tar.gz |
Fix a nasty bug with variable name shadowing
Diffstat (limited to 'init')
-rw-r--r-- | init/halt.c | 2 | ||||
-rw-r--r-- | init/poweroff.c | 2 | ||||
-rw-r--r-- | init/reboot.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/init/halt.c b/init/halt.c index a6fec02..d66e28d 100644 --- a/init/halt.c +++ b/init/halt.c @@ -30,7 +30,7 @@ extern int halt_main(int argc, char **argv) /* don't assume init's pid == 1 */ pid_t *pid = find_pid_by_name("init"); if (!pid || *pid<=0) { - pid_t *pid = find_pid_by_name("linuxrc"); + pid = find_pid_by_name("linuxrc"); if (!pid || *pid<=0) error_msg_and_die("no process killed"); } diff --git a/init/poweroff.c b/init/poweroff.c index eba5134..db20a45 100644 --- a/init/poweroff.c +++ b/init/poweroff.c @@ -30,7 +30,7 @@ extern int poweroff_main(int argc, char **argv) /* don't assume init's pid == 1 */ pid_t *pid = find_pid_by_name("init"); if (!pid || *pid<=0) { - pid_t *pid = find_pid_by_name("linuxrc"); + pid = find_pid_by_name("linuxrc"); if (!pid || *pid<=0) error_msg_and_die("no process killed"); } diff --git a/init/reboot.c b/init/reboot.c index bdcd443..35afd74 100644 --- a/init/reboot.c +++ b/init/reboot.c @@ -30,7 +30,7 @@ extern int reboot_main(int argc, char **argv) /* don't assume init's pid == 1 */ pid_t *pid = find_pid_by_name("init"); if (!pid || *pid<=0) { - pid_t *pid = find_pid_by_name("linuxrc"); + pid = find_pid_by_name("linuxrc"); if (!pid || *pid<=0) error_msg_and_die("no process killed"); } |