naccyde / rpms / systemd

Forked from rpms/systemd a year ago
Clone
4bff0a
From 03f2823251d39ea455c2e98ae8bf109f6caf153f Mon Sep 17 00:00:00 2001
4bff0a
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
4bff0a
Date: Fri, 3 Aug 2018 16:36:51 +0200
4bff0a
Subject: [PATCH] bus-message: drop asserts in functions which are wrappers for
4bff0a
 varargs version
4bff0a
4bff0a
The function does no processing on it's own, and just forwards arguments
4bff0a
to the other function. Let's just use the asserts there.
4bff0a
4bff0a
(cherry picked from commit 8792bdf8a3311f9e629daa0ec592c97c1cfb2a7c)
4bff0a
4bff0a
Resolves: #1696224
4bff0a
---
4bff0a
 src/libsystemd/sd-bus/bus-message.c | 9 ---------
4bff0a
 1 file changed, 9 deletions(-)
4bff0a
4bff0a
diff --git a/src/libsystemd/sd-bus/bus-message.c b/src/libsystemd/sd-bus/bus-message.c
4bff0a
index ac823aaf58..153cdf933b 100644
4bff0a
--- a/src/libsystemd/sd-bus/bus-message.c
4bff0a
+++ b/src/libsystemd/sd-bus/bus-message.c
4bff0a
@@ -2469,11 +2469,6 @@ _public_ int sd_bus_message_append(sd_bus_message *m, const char *types, ...) {
4bff0a
         va_list ap;
4bff0a
         int r;
4bff0a
 
4bff0a
-        assert_return(m, -EINVAL);
4bff0a
-        assert_return(types, -EINVAL);
4bff0a
-        assert_return(!m->sealed, -EPERM);
4bff0a
-        assert_return(!m->poisoned, -ESTALE);
4bff0a
-
4bff0a
         va_start(ap, types);
4bff0a
         r = sd_bus_message_appendv(m, types, ap);
4bff0a
         va_end(ap);
4bff0a
@@ -4524,10 +4519,6 @@ _public_ int sd_bus_message_read(sd_bus_message *m, const char *types, ...) {
4bff0a
         va_list ap;
4bff0a
         int r;
4bff0a
 
4bff0a
-        assert_return(m, -EINVAL);
4bff0a
-        assert_return(m->sealed, -EPERM);
4bff0a
-        assert_return(types, -EINVAL);
4bff0a
-
4bff0a
         va_start(ap, types);
4bff0a
         r = message_read_ap(m, types, ap);
4bff0a
         va_end(ap);