Commit d0c4402d authored by Simon Giesecke's avatar Simon Giesecke

Problem: needless use of macros

Solution: convert streq/strneq into functions
parent a62e9d35
......@@ -29,6 +29,8 @@
#include "testutil.hpp"
#include "testutil_unity.hpp"
#include <string.h>
const char *SEQ_END = (const char *) 1;
const char bounce_content[] = "12345678ABCDEFGH12345678abcdefgh";
......@@ -345,3 +347,13 @@ sockaddr_in bind_bsd_socket (int socket)
return saddr;
}
bool streq (const char *lhs, const char *rhs)
{
return strcmp (lhs, rhs) == 0;
}
bool strneq (const char *lhs, const char *rhs)
{
return strcmp (lhs, rhs) != 0;
}
......@@ -150,8 +150,8 @@ int s_send (void *socket_, const char *string_);
// Sends string as 0MQ string, as multipart non-terminal
int s_sendmore (void *socket_, const char *string_);
#define streq(s1, s2) (!strcmp ((s1), (s2)))
#define strneq(s1, s2) (strcmp ((s1), (s2)))
bool streq (const char *lhs, const char *rhs);
bool strneq (const char *lhs, const char *rhs);
extern const char *SEQ_END;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment