]> git.itanic.dy.fi Git - rrdd/commitdiff
main: Add NULL terminator to option array
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 19 May 2012 18:06:49 +0000 (21:06 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Sat, 19 May 2012 18:06:49 +0000 (21:06 +0300)
getopt_long() requires the struct option array to be terminated with
an element that is filled with zeroes.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
main.c

diff --git a/main.c b/main.c
index 5ca5e3e3cca21d5c28e97a40bebb6c01ddc66051..17cfc8acc993da3090c6699d26d36a59265df214 100644 (file)
--- a/main.c
+++ b/main.c
@@ -19,6 +19,7 @@ int read_args(int argc, char *argv[], struct user_options *opts)
        int option_index = 0, c;
        static struct option long_options[] = {
                { .val = 'j', .name = "jobs", .has_arg = 1, },
+               { },
        };
        char short_options[] = "j:";