diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-03-22 00:24:21 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-03-22 00:24:21 +0100 |
commit | b8beb2781682738f3a59aab993bf2869447a77c9 (patch) | |
tree | 6cebf0391a2558f983a586e4f28c5eea3c99e589 /src/libsystemd-bus/test-bus-marshal.c | |
parent | b9bf7e2be93fe25e0e96e06ad436d43a1e589ed5 (diff) |
bus: generate a nice error when attempting to add a NULL string
Diffstat (limited to 'src/libsystemd-bus/test-bus-marshal.c')
-rw-r--r-- | src/libsystemd-bus/test-bus-marshal.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libsystemd-bus/test-bus-marshal.c b/src/libsystemd-bus/test-bus-marshal.c index 15c472cca0..d12c847f35 100644 --- a/src/libsystemd-bus/test-bus-marshal.c +++ b/src/libsystemd-bus/test-bus-marshal.c @@ -50,6 +50,9 @@ int main(int argc, char *argv[]) { r = sd_bus_message_append(m, "s", "a string"); assert_se(r >= 0); + r = sd_bus_message_append(m, "s", NULL); + assert_se(r < 0); + r = sd_bus_message_append(m, "as", 2, "string #1", "string #2"); assert_se(r >= 0); |