diff options
Diffstat (limited to 'src/utils/utils.h')
-rw-r--r-- | src/utils/utils.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/utils/utils.h b/src/utils/utils.h index 5a26cf2..3b44f3f 100644 --- a/src/utils/utils.h +++ b/src/utils/utils.h @@ -4,6 +4,8 @@ #include <stddef.h> #include "types.h" +#define FREE_AND_NULLIFY(x) do{if(x)free(x); x = NULL;}while(0) + int regex_match(const char *, str_array_t, str_array_t *); int substitute_str(const char *subject, const char *pattern, @@ -13,7 +15,4 @@ const char *mimeType2ext(const char *mimeType); int repchr(char *str, char t, char r); -/* NOTICE: pass a pointer-to-pointer to free the original pointer. */ -void free_and_nullify(void *p); - #endif |