]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
tree-wide: do not return error codes as bool 883/head
authorThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 5 Aug 2015 22:32:25 +0000 (00:32 +0200)
committerThomas Hindoe Paaboel Andersen <phomes@gmail.com>
Wed, 5 Aug 2015 22:49:45 +0000 (00:49 +0200)
src/libsystemd-network/sd-dhcp-server.c
src/libsystemd-network/sd-ipv4ll.c
src/udev/cdrom_id/cdrom_id.c

index a0af256deec58ce920a8d82a1ba413d327525e13..faeab0fd309bfa73661227537c08ee3694c68cfa 100644 (file)
@@ -67,7 +67,7 @@ int sd_dhcp_server_set_address(sd_dhcp_server *server, struct in_addr *address,
 }
 
 bool sd_dhcp_server_is_running(sd_dhcp_server *server) {
-        assert_return(server, -EINVAL);
+        assert_return(server, false);
 
         return !!server->receive_message;
 }
index 0cb77ccf713cbc80e2d1255293e6c6d432b60995..f080c5c0a7f449978d978b3fb7d8ac661a947d54 100644 (file)
@@ -507,7 +507,7 @@ error:
 }
 
 bool sd_ipv4ll_is_running(sd_ipv4ll *ll) {
-        assert_return(ll, -EINVAL);
+        assert_return(ll, false);
 
         return !IN_SET(ll->state, IPV4LL_STATE_INIT, IPV4LL_STATE_STOPPED);
 }
index 3d74ae50f1b9287580dfbcc4c32b705eb14f67da..775da0355d6aae5ef147878b06ae5c691f6b6a26 100644 (file)
@@ -106,11 +106,11 @@ static bool is_mounted(const char *device)
         bool mounted = false;
 
         if (stat(device, &statbuf) < 0)
-                return -ENODEV;
+                return false;
 
         fp = fopen("/proc/self/mountinfo", "re");
         if (fp == NULL)
-                return -ENOSYS;
+                return false;
         while (fscanf(fp, "%*s %*s %i:%i %*[^\n]", &maj, &min) == 2) {
                 if (makedev(maj, min) == statbuf.st_rdev) {
                         mounted = true;