summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@gmail.com>2015-07-28 18:13:33 +0200
committerSven Eden <yamakuzure@gmx.net>2017-03-14 10:07:19 +0100
commitd455a7ccd53c158fc6ef51ee4b5ba8d34f7794f4 (patch)
treedff2e4a7ba02246ab70aa567dbfa9fbf2603670d /src
parent21127a147a58a99640a0b8672350d48b47110df2 (diff)
sd-bus: drop redundant code
If c->item_size is 0, the next item to parse in a structure is empty. However, this also implies that the signature must be empty. The latter case is already handled just fine by enter_struct_or_dict_entry() so there is no reason to handle the same case in the caller.
Diffstat (limited to 'src')
-rw-r--r--src/libelogind/sd-bus/bus-message.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/libelogind/sd-bus/bus-message.c b/src/libelogind/sd-bus/bus-message.c
index 081f39d83..c8806d516 100644
--- a/src/libelogind/sd-bus/bus-message.c
+++ b/src/libelogind/sd-bus/bus-message.c
@@ -3954,12 +3954,6 @@ static int enter_struct_or_dict_entry(
if (r < 0)
return r;
- } else if (c->item_size <= 0) {
-
- /* gvariant empty struct */
- *item_size = 0;
- *offsets = NULL;
- *n_offsets = 0;
} else
/* gvariant with contents */
return build_struct_offsets(m, contents, c->item_size, item_size, offsets, n_offsets);