chiark / gitweb /
Always use errno > 0 to help gcc
[elogind.git] / src / libsystemd-bus / sd-bus.c
index 5f2ede088a32bcb471edc232af62a2561d7804be..08a218b7cccbf7174f16f5b2da789fa1a194ffc3 100644 (file)
@@ -507,7 +507,7 @@ static int parse_exec_address(sd_bus *b, const char **p, char **guid) {
 
                         errno = 0;
                         ul = strtoul(*p + 4, (char**) p, 10);
-                        if (errno != 0 || **p != '=' || ul > 256) {
+                        if (errno > 0 || **p != '=' || ul > 256) {
                                 r = -EINVAL;
                                 goto fail;
                         }
@@ -1944,7 +1944,7 @@ static int bus_add_object(
                 return -ENOMEM;
 
         c->path = strdup(path);
-        if (!path) {
+        if (!c->path) {
                 free(c);
                 return -ENOMEM;
         }