chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Wed, 5 Jul 2017 06:50:51 +0000 (08:50 +0200)
Instead of ignoring empty strings retrieved via the bus, treat them as NULL, as
it's customary in elogind.

src/shared/bus-util.c

index 2af4dde34a1a5f0d6a878eba18631f258c88f721..62ce245f7ab8d1d600f2ce1aed849283d04b5397 100644 (file)
@@ -1029,7 +1029,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;