Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-10-18 08:04:34 +0400
committerEric Andersen <andersen@codepoet.org>2001-10-18 08:04:34 +0400
commit11fdb8a4c79752157a8263fbcf583916d5ec0347 (patch)
treea59376401e4f839f9cbd8538bd7caa2d0dd3658f /poweroff.c
parent1bf25f030777a83ed498914ad65ba3d44b8b3fdc (diff)
Fix a nasty bug with variable name shadowing
Diffstat (limited to 'poweroff.c')
-rw-r--r--poweroff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/poweroff.c b/poweroff.c
index eba51342c..db20a4572 100644
--- a/poweroff.c
+++ b/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");
}