Skip to content

Commit

Permalink
mx_util: Add mx_free_null()
Browse files Browse the repository at this point in the history
  • Loading branch information
mariux committed May 13, 2015
1 parent 8927398 commit 35a9ef6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mx_util.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
#ifndef __MX_UTIL_H__
#define __MX_UTIL_H__ 1

#include <stdlib.h>
#include <stdint.h>
#include <stdarg.h>

#undef mx_free_null
#define mx_free_null(a) do { free(a); (a) = NULL; } while(0)

int mx_strbeginswith(char *str, const char *start, char **endptr);
int mx_stribeginswith(char *str, const char *start, char **endptr);
int mx_strbeginswithany(char *str, char **starts, char **endptr);
Expand Down

0 comments on commit 35a9ef6

Please sign in to comment.