]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/opt.c
opt: increase testing coverage on 64 bit platforms
[ccan] / ccan / opt / opt.c
index 827109e34074f0edc33226f8157ab31bd27bd70c..db7686be10eba44a08cec27c945aff7002a5b0fb 100644 (file)
@@ -1,3 +1,4 @@
+/* Licensed under GPLv3+ - see LICENSE file for details */
 #include <ccan/opt/opt.h>
 #include <string.h>
 #include <errno.h>
@@ -204,7 +205,8 @@ bool opt_parse(int *argc, char *argv[], void (*errlog)(const char *fmt, ...))
 void opt_free_table(void)
 {
        free(opt_table);
-       opt_table=0;
+       opt_table = NULL;
+       opt_count = opt_num_short = opt_num_short_arg = opt_num_long = 0;
 }
 
 void opt_log_stderr(const char *fmt, ...)