Author: Nick Mathewson <ni...@to...>
Date: Sun, 18 Nov 2012 01:40:33 -0500
Subject: Fix a gcc warning in rtrim test
Commit: 173d782345eb3647d02e4d8a6209c690f1fbd07b
---
test/regress_util.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/test/regress_util.c b/test/regress_util.c
index 6c8374d..9f8c316 100644
--- a/test/regress_util.c
+++ b/test/regress_util.c
@@ -440,18 +440,14 @@ test_evutil_rtrim(void *ptr)
#define TEST_TRIM(s, result) \
do { \
if (cp) mm_free(cp); \
- cp = s ? mm_strdup(s) : NULL; \
+ cp = mm_strdup(s); \
evutil_rtrim_lws_(cp); \
- if (result == NULL) \
- tt_ptr_op(cp, ==, NULL); \
- else \
- tt_str_op(cp, ==, result); \
+ tt_str_op(cp, ==, result); \
} while(0)
char *cp = NULL;
(void) ptr;
- TEST_TRIM(NULL, NULL);
TEST_TRIM("", "");
TEST_TRIM("a", "a");
TEST_TRIM("abcdef ghi", "abcdef ghi");
--
1.7.4.1
|