From 74d074597188cd6df28b777055ea6644272ace5c Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 29 Oct 2014 20:14:03 +0100 Subject: fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index 086dd7f..5bcc315 100644 --- a/src/common.h +++ b/src/common.h @@ -28,6 +28,7 @@ #include #include #include +#include @@ -44,7 +45,7 @@ #define LIST_ARGUMENTS X(action) X(username) X(ttyname) X(pid) X(hostname) -#define streq(a, b) ((a == b) || (a && b && !strcmp(a, b))) +#define streq(a, b) (((a == NULL) == (b == NULL)) || (a && b && !strcmp(a, b))) #define xstrcpy(d, s) (s ? snprintf(d, sizeof(d) / sizeof(char), "%s", s) : 0) #define xmemcpy(d, s) (s ? memcpy(d, s, sizeof(d)) : 0) -- cgit v1.2.3-70-g09d2