From caa368e1cc901abf75c02ae19d70d148a95e79ba Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 5 May 2008 19:19:47 +0000 Subject: [PATCH] r19610@catbus: nickm | 2008-05-05 15:18:52 -0400 Switch strcmp() tests in test_evbuffer() to use memcmp instead. Previously they broke on my Linux box. svn:r779 --- test/regress.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/regress.c b/test/regress.c index 63eee8a2..45105341 100644 --- a/test/regress.c +++ b/test/regress.c @@ -980,13 +980,13 @@ test_evbuffer(void) evbuffer_validate(evb); if (EVBUFFER_LENGTH(evb) != 7 || - strcmp((char*)EVBUFFER_DATA(evb), "hello/1") != 0) + memcmp((char*)EVBUFFER_DATA(evb), "hello/1", 1) != 0) goto out; evbuffer_drain(evb, strlen("hello/")); evbuffer_validate(evb); if (EVBUFFER_LENGTH(evb) != 1 || - strcmp((char*)EVBUFFER_DATA(evb), "1") != 0) + memcmp((char*)EVBUFFER_DATA(evb), "1", 1) != 0) goto out; evbuffer_add_printf(evb_two, "%s", "/hello"); @@ -996,7 +996,7 @@ test_evbuffer(void) if (EVBUFFER_LENGTH(evb_two) != 0 || EVBUFFER_LENGTH(evb) != 7 || - strcmp((char*)EVBUFFER_DATA(evb), "1/hello") != 0) + memcmp((char*)EVBUFFER_DATA(evb), "1/hello", 7) != 0) goto out; memset(buffer, 0, sizeof(buffer)); -- 2.40.0