From: Daniel Mack Date: Tue, 24 Feb 2015 12:26:09 +0000 (+0100) Subject: shared/time-util: fix gcc5 warning X-Git-Tag: v220~1014 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e8933ca0f06bae19cb6db601e83b33f8ac80f2a;p=thirdparty%2Fsystemd.git shared/time-util: fix gcc5 warning CC src/shared/libsystemd_shared_la-time-util.lo src/shared/time-util.c: In function 'parse_nsec': src/shared/time-util.c:789:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses] if (!*s != 0) ^ --- diff --git a/src/shared/time-util.c b/src/shared/time-util.c index 947ac1fcfb2..1c36c577c4a 100644 --- a/src/shared/time-util.c +++ b/src/shared/time-util.c @@ -786,7 +786,7 @@ int parse_nsec(const char *t, nsec_t *nsec) { s = startswith(p, "infinity"); if (s) { s += strspn(s, WHITESPACE); - if (!*s != 0) + if (*s != 0) return -EINVAL; *nsec = NSEC_INFINITY;