]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-message: drop asserts in functions which are wrappers for varargs version
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 3 Aug 2018 14:36:51 +0000 (16:36 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 2 Oct 2018 09:53:20 +0000 (11:53 +0200)
The function does no processing on it's own, and just forwards arguments
to the other function. Let's just use the asserts there.

src/libsystemd/sd-bus/bus-message.c

index f544ec13ce1016cb562f5f95523a26af6486256a..eee8e39195565fcdb047688dff4dc85c2972e779 100644 (file)
@@ -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);