chiark / gitweb /
sd-network: if a boolean is mising, we should just take it as false
authorLennart Poettering <lennart@poettering.net>
Wed, 16 Jul 2014 23:41:03 +0000 (01:41 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 16 Jul 2014 23:42:26 +0000 (01:42 +0200)
That way, we can deprecate fields later on without problems

src/network/sd-network.c

index 317d087..1b7518f 100644 (file)
@@ -235,7 +235,7 @@ static int network_get_boolean(const char *key, unsigned index) {
         if (r < 0)
                 return r;
         else if (!s)
-                return -EIO;
+                return false;
 
         return parse_boolean(s);
 }