]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/opt.c
opt: neaten tests with helpers.
[ccan] / ccan / opt / opt.c
index 5aaa000b64a1cd31fd1078c021d62c4117c47146..db7686be10eba44a08cec27c945aff7002a5b0fb 100644 (file)
@@ -205,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, ...)