]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-util: treat an empty string as a NULL
authorLennart Poettering <lennart@poettering.net>
Wed, 17 Aug 2016 17:03:44 +0000 (19:03 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 22 Aug 2016 14:14:21 +0000 (16:14 +0200)
Instead of ignoring empty strings retrieved via the bus, treat them as NULL, as
it's customary in systemd.

src/shared/bus-util.c

index b7dda3ee4d448f94326c6ac48ba19e784050ab0d..af676db3ea0320cbb691cda701f97d1e8a3a3408 100644 (file)
@@ -1025,7 +1025,7 @@ static int map_basic(sd_bus *bus, const char *member, sd_bus_message *m, sd_bus_
                         break;
 
                 if (isempty(s))
-                        break;
+                        s = NULL;
 
                 r = free_and_strdup(p, s);
                 break;