summaryrefslogtreecommitdiff
path: root/lib/urlapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/urlapi.c')
-rw-r--r--lib/urlapi.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index ae7596359..e3a788221 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -983,12 +983,14 @@ void curl_url_cleanup(CURLU *u)
}
}
-#define DUP(dest, src, name) \
- if(src->name) { \
- dest->name = strdup(src->name); \
- if(!dest->name) \
- goto fail; \
- }
+#define DUP(dest, src, name) \
+ do { \
+ if(src->name) { \
+ dest->name = strdup(src->name); \
+ if(!dest->name) \
+ goto fail; \
+ } \
+ } while(0)
CURLU *curl_url_dup(CURLU *in)
{