Add a zeroed final option for getopt_long for correctness

This commit is contained in:
Marc Di Luzio 2019-05-15 18:17:50 +01:00
parent 0d018d91a8
commit 41d35fa12a

View File

@ -114,7 +114,8 @@ int main(int argc, char *argv[])
{ "test", no_argument, 0, 't' },
{ "status", optional_argument, 0, 's' },
{ "help", no_argument, 0, 'h' },
{ "version", no_argument, 0, 'v' } };
{ "version", no_argument, 0, 'v' },
{ NULL, 0, NULL, 0 }, };
static const char *short_options = "dls::r::tvh";
while ((opt = getopt_long(argc, argv, short_options, long_options, 0)) != -1) {