From d721d8453e6c0ff7112e8228eb58aa438d1f7f1a Mon Sep 17 00:00:00 2001 From: Bert Münnich Date: Mon, 26 Sep 2011 21:53:52 +0200 Subject: Added STREQ macro --- util.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'util.h') diff --git a/util.h b/util.h index 8155613..68e534e 100644 --- a/util.h +++ b/util.h @@ -30,7 +30,9 @@ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif -#define ARRLEN(a) (sizeof(a) / sizeof(a[0])) +#define ARRLEN(a) (sizeof(a) / sizeof((a)[0])) + +#define STREQ(a,b) (!strcmp((a), (b))) #define TIMEDIFF(t1,t2) (((t1)->tv_sec - (t2)->tv_sec) * 1000 + \ ((t1)->tv_usec - (t2)->tv_usec) / 1000) -- cgit v1.2.3