diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-12-10 03:04:16 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-12-10 03:04:16 +0100 |
commit | 224a1ed4c152c394d42b8a6fd78159af400d5df3 (patch) | |
tree | 11a0dffd43ca5a13e28f33ac214522eba2ac71e5 /src | |
parent | 041b85cf01ac2783d61b22da4eea8503cf8b0d5a (diff) |
bus: empty gvariant arrays should at least get size 1
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd-bus/bus-message.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libsystemd-bus/bus-message.c b/src/libsystemd-bus/bus-message.c index 32af8609b3..4488e7b6b3 100644 --- a/src/libsystemd-bus/bus-message.c +++ b/src/libsystemd-bus/bus-message.c @@ -1894,9 +1894,7 @@ _public_ int sd_bus_message_open_container( } static size_t determine_word_size(size_t sz, size_t extra) { - if (sz <= 0 && extra == 0) - return 0; - else if (sz + extra <= 0xFF) + if (sz + extra <= 0xFF) return 1; else if (sz + extra*2 <= 0xFFFF) return 2; |