chiark / gitweb /
systemctl: make sure getopt doesn't segfault
authorLennart Poettering <lennart@poettering.net>
Tue, 15 Jun 2010 17:47:38 +0000 (19:47 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 15 Jun 2010 17:47:38 +0000 (19:47 +0200)
src/systemctl.c

index be32b0d..4afe53e 100644 (file)
@@ -1343,7 +1343,8 @@ static int parse_argv(int argc, char *argv[]) {
                 { "replace",   no_argument,       NULL, ARG_REPLACE },
                 { "session",   no_argument,       NULL, ARG_SESSION },
                 { "system",    no_argument,       NULL, ARG_SYSTEM  },
-                { "block",     no_argument,       NULL, ARG_BLOCK   }
+                { "block",     no_argument,       NULL, ARG_BLOCK   },
+                { NULL,        0,                 NULL, 0           }
         };
 
         int c;