summaryrefslogtreecommitdiff
path: root/src/test/test_util.c
diff options
context:
space:
mode:
authorteor <teor2345@gmail.com>2015-06-03 03:52:31 +1000
committerteor <teor2345@gmail.com>2015-06-03 04:19:05 +1000
commite0477de0e262e9009021cbd0556b7a9541d2192c (patch)
tree7c237ce1805d432744d1593c336f6f0bb5f856dd /src/test/test_util.c
parent2b73dbf2a4c2fcf42fdd2987b3fa72efdec3a222 (diff)
downloadtor-e0477de0e262e9009021cbd0556b7a9541d2192c.tar.gz
tor-e0477de0e262e9009021cbd0556b7a9541d2192c.zip
Remove undefined directive-in-macro in test_util_writepid
clang 3.7 complains that using a preprocessor directive inside a macro invocation in test_util_writepid in test_util.c is undefined. Fix on 79e85313aa61 on 0.2.7.1-alpha.
Diffstat (limited to 'src/test/test_util.c')
-rw-r--r--src/test/test_util.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/test_util.c b/src/test/test_util.c
index 30dc59844a..b0366db37f 100644
--- a/src/test/test_util.c
+++ b/src/test/test_util.c
@@ -4319,13 +4319,12 @@ test_util_writepid(void *arg)
int n = sscanf(contents, "%lu\n%c", &pid, &c);
tt_int_op(n, OP_EQ, 1);
- tt_uint_op(pid, OP_EQ,
+
#ifdef _WIN32
- _getpid()
+ tt_uint_op(pid, OP_EQ, _getpid());
#else
- getpid()
+ tt_uint_op(pid, OP_EQ, getpid());
#endif
- );
done:
tor_free(contents);