]> git.ozlabs.org Git - ccan/blobdiff - ccan/opt/test/utils.c
opt: complete coverage, enhance opt_free_table.
[ccan] / ccan / opt / test / utils.c
index 9544fa77bd3493382c07e72f77f770d09b3d4cc7..21e0b727ebd6cab4762526dc5a21a11a3eb5f072 100644 (file)
@@ -49,6 +49,13 @@ void save_err_output(const char *fmt, ...)
                err_output = p;
 }      
 
+void reset_options(void)
+{
+       opt_free_table();
+       free(err_output);
+       err_output = NULL;
+}
+
 static bool allocated = false;
 
 bool parse_args(int *argc, char ***argv, ...)