]> err.no Git - systemd/commitdiff
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 be32b0d152d2c849709af00dbc9ebcd0ffc04fcb..4afe53e18d4d09ba0035070d373b26de2eec844d 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;