ryantimwilson / rpms / systemd

Forked from rpms/systemd a month ago
Clone
803fb7
From 15bfa13aa624e1f2a15571ad5278acec643c0489 Mon Sep 17 00:00:00 2001
803fb7
From: Daniel Mack <daniel@zonque.org>
803fb7
Date: Tue, 24 Feb 2015 13:26:09 +0100
803fb7
Subject: [PATCH] shared/time-util: fix gcc5 warning
803fb7
803fb7
  CC       src/shared/libsystemd_shared_la-time-util.lo
803fb7
src/shared/time-util.c: In function 'parse_nsec':
803fb7
src/shared/time-util.c:789:25: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
803fb7
                 if (!*s != 0)
803fb7
                         ^
803fb7
803fb7
(cherry picked from commit 8e8933ca0f06bae19cb6db601e83b33f8ac80f2a)
803fb7
---
803fb7
 src/shared/time-util.c | 2 +-
803fb7
 1 file changed, 1 insertion(+), 1 deletion(-)
803fb7
803fb7
diff --git a/src/shared/time-util.c b/src/shared/time-util.c
803fb7
index 947ac1fcf..1c36c577c 100644
803fb7
--- a/src/shared/time-util.c
803fb7
+++ b/src/shared/time-util.c
803fb7
@@ -786,7 +786,7 @@ int parse_nsec(const char *t, nsec_t *nsec) {
803fb7
         s = startswith(p, "infinity");
803fb7
         if (s) {
803fb7
                 s += strspn(s, WHITESPACE);
803fb7
-                if (!*s != 0)
803fb7
+                if (*s != 0)
803fb7
                         return -EINVAL;
803fb7
 
803fb7
                 *nsec = NSEC_INFINITY;