summaryrefslogtreecommitdiff
path: root/kexec/kexec.c
diff options
context:
space:
mode:
Diffstat (limited to 'kexec/kexec.c')
-rw-r--r--kexec/kexec.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/kexec/kexec.c b/kexec/kexec.c
index 2a71ace..3a1656a 100644
--- a/kexec/kexec.c
+++ b/kexec/kexec.c
@@ -704,13 +704,12 @@ int k_unload (unsigned long kexec_flags)
*/
static int my_shutdown(void)
{
- char *args[8];
- int i = 0;
-
- args[i++] = "shutdown";
- args[i++] = "-r";
- args[i++] = "now";
- args[i++] = NULL;
+ char *args[] = {
+ "shutdown",
+ "-r",
+ "now",
+ NULL
+ };
execv("/sbin/shutdown", args);
execv("/etc/shutdown", args);