aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tool_getparam.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 579437eb7..685c224de 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -56,10 +56,11 @@
free(*(str)); \
*(str) = NULL; \
} \
- if((val)) \
+ if((val)) { \
*(str) = strdup((val)); \
- if(!(val)) \
- return PARAM_NO_MEM; \
+ if(!(*(str))) \
+ return PARAM_NO_MEM; \
+ } \
} WHILE_FALSE
struct LongShort {