diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libstrongswan/utils.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libstrongswan/utils.h b/src/libstrongswan/utils.h index 6334b8e01..aeaa4e74b 100644 --- a/src/libstrongswan/utils.h +++ b/src/libstrongswan/utils.h @@ -74,7 +74,10 @@ /** * NULL-safe strdup variant */ -#define strdupnull(x) ({ char *_x = x; _x ? strdup(_x) : NULL; }) +static inline char *strdupnull(const char *s) +{ + return s ? strdup(s) : NULL; +} /** * Macro compares two binary blobs for equality |