From bbdd1c65b318fe7ab9ecbc6be23e494c2c54432e Mon Sep 17 00:00:00 2001
From: Yoni Fogel <yoni@tokutek.com>
Date: Wed, 24 Mar 2010 01:42:39 +0000
Subject: [PATCH] [t:2216] windows port of #2216 merge (remove statement
 expressions)

git-svn-id: file:///svn/toku/tokudb@18753 c7de825b-a66e-492c-adef-691d508d4ae1
---
 newbrt/brtloader.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/newbrt/brtloader.c b/newbrt/brtloader.c
index fc6a089ea5d..496b1464e65 100644
--- a/newbrt/brtloader.c
+++ b/newbrt/brtloader.c
@@ -191,20 +191,20 @@ int toku_brt_loader_open (/* out */ BRTLOADER *blp,
     bl->N = N;
 
 #define MY_CALLOC_N(n,v) CALLOC_N(n,v); if (!v) { int r = errno; brtloader_destroy(bl, TRUE); return r; }
-#define MY_STRDUP(s) ({ char *v = toku_strdup(s); if (!v) { int r = errno; brtloader_destroy(bl, TRUE); return r; } v; })
+#define SET_TO_MY_STRDUP(lval, s) do { char *v = toku_strdup(s); if (!v) { int r = errno; brtloader_destroy(bl, TRUE); return r; } lval = v; } while (0)
 
     MY_CALLOC_N(N, bl->dbs);
     for (int i=0; i<N; i++) bl->dbs[i]=dbs[i];
     MY_CALLOC_N(N, bl->descriptors);
     for (int i=0; i<N; i++) bl->descriptors[i]=descriptors[i];
     MY_CALLOC_N(N, bl->new_fnames_in_env);
-    for (int i=0; i<N; i++) bl->new_fnames_in_env[i] = MY_STRDUP(new_fnames_in_env[i]);
+    for (int i=0; i<N; i++) SET_TO_MY_STRDUP(bl->new_fnames_in_env[i], new_fnames_in_env[i]);
     MY_CALLOC_N(N, bl->bt_compare_funs);
     for (int i=0; i<N; i++) bl->bt_compare_funs[i] = bt_compare_functions[i];
 
     brtloader_init_file_infos(&bl->file_infos);
 
-    bl->temp_file_template = MY_STRDUP(temp_file_template);
+    SET_TO_MY_STRDUP(bl->temp_file_template, temp_file_template);
     bl->fprimary_rows = bl->fprimary_idx = FIDX_NULL;
     { int r = brtloader_open_temp_file(bl, &bl->fprimary_rows); if (r!=0) return r; }
     { int r = brtloader_open_temp_file(bl, &bl->fprimary_idx);  if (r!=0) return r; }
-- 
2.30.9