Signed-off-by: Jamey Sharp <[EMAIL PROTECTED]>
---
Admittedly gratuitous, but I couldn't stand it. :-)

 kexec/kexec.c |   13 ++++++-------
 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);
-- 
1.5.4.1


_______________________________________________
kexec mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/kexec

Reply via email to