summaryrefslogtreecommitdiff
path: root/lib/smb.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/smb.c')
-rw-r--r--lib/smb.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/smb.c b/lib/smb.c
index dd914a05b..c97962168 100644
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -124,13 +124,17 @@ const struct Curl_handler Curl_handler_smbs = {
/* Append a string to an SMB message */
#define MSGCAT(str) \
- strcpy(p, (str)); \
- p += strlen(str);
+ do { \
+ strcpy(p, (str)); \
+ p += strlen(str); \
+ } while(0)
/* Append a null-terminated string to an SMB message */
#define MSGCATNULL(str) \
- strcpy(p, (str)); \
- p += strlen(str) + 1;
+ do { \
+ strcpy(p, (str)); \
+ p += strlen(str) + 1; \
+ } while(0)
/* SMB is mostly little endian */
#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) || \