From: Zbigniew Jędrzejewski-Szmek Date: Fri, 3 Aug 2018 14:36:51 +0000 (+0200) Subject: bus-message: drop asserts in functions which are wrappers for varargs version X-Git-Tag: v240~650^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8792bdf8a3311f9e629daa0ec592c97c1cfb2a7c;p=platform%2Fupstream%2Fsystemd.git bus-message: drop asserts in functions which are wrappers for varargs version The function does no processing on it's own, and just forwards arguments to the other function. Let's just use the asserts there. --- diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c index f544ec1..eee8e39 100644 --- a/src/libsystemd/sd-bus/bus-message.c +++ b/src/libsystemd/sd-bus/bus-message.c @@ -2444,11 +2444,6 @@ _public_ int sd_bus_message_append(sd_bus_message *m, const char *types, ...) { va_list ap; int r; - assert_return(m, -EINVAL); - assert_return(types, -EINVAL); - assert_return(!m->sealed, -EPERM); - assert_return(!m->poisoned, -ESTALE); - va_start(ap, types); r = sd_bus_message_appendv(m, types, ap); va_end(ap); @@ -4501,10 +4496,6 @@ _public_ int sd_bus_message_read(sd_bus_message *m, const char *types, ...) { va_list ap; int r; - assert_return(m, -EINVAL); - assert_return(m->sealed, -EPERM); - assert_return(types, -EINVAL); - va_start(ap, types); r = sd_bus_message_readv(m, types, ap); va_end(ap);