diff options
| author | Mattias Andrée <maandree@operamail.com> | 2014-10-29 20:14:03 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@operamail.com> | 2014-10-29 20:14:03 +0100 |
| commit | 74d074597188cd6df28b777055ea6644272ace5c (patch) | |
| tree | 8b14ed771cd030f1ebe35d2b81cf88a0f112b759 | |
| parent | add log-login-syslog (diff) | |
| download | cerberus-logging-74d074597188cd6df28b777055ea6644272ace5c.tar.gz cerberus-logging-74d074597188cd6df28b777055ea6644272ace5c.tar.bz2 cerberus-logging-74d074597188cd6df28b777055ea6644272ace5c.tar.xz | |
fix warnings
Signed-off-by: Mattias Andrée <maandree@operamail.com>
| -rw-r--r-- | src/common.h | 3 |
1 files changed, 2 insertions, 1 deletions
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 <errno.h> #include <sys/stat.h> #include <fcntl.h> +#include <stdlib.h> @@ -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) |
