summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--halt.c2
-rw-r--r--init/halt.c2
-rw-r--r--init/poweroff.c2
-rw-r--r--init/reboot.c2
-rw-r--r--poweroff.c2
-rw-r--r--reboot.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/halt.c b/halt.c
index a6fec02..d66e28d 100644
--- a/halt.c
+++ b/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/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");
}
diff --git a/poweroff.c b/poweroff.c
index eba5134..db20a45 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");
}
diff --git a/reboot.c b/reboot.c
index bdcd443..35afd74 100644
--- a/reboot.c
+++ b/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");
}