From: Gaurav Date: Tue, 15 Dec 2020 10:11:46 +0000 (+0530) Subject: Fix review comments in added debug log. X-Git-Tag: v248-rc1~503 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa8342228b29e6cc419ca27159617dccc321d668;p=thirdparty%2Fsystemd.git Fix review comments in added debug log. --- diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c index b74edda9433..0f1ea45c08e 100644 --- a/src/libsystemd/sd-bus/bus-internal.c +++ b/src/libsystemd/sd-bus/bus-internal.c @@ -3,9 +3,9 @@ #include "alloc-util.h" #include "bus-internal.h" #include "bus-message.h" +#include "escape.h" #include "hexdecoct.h" #include "string-util.h" -#include "escape.h" bool object_path_is_valid(const char *p) { const char *q; @@ -94,12 +94,8 @@ bool interface_name_is_valid(const char *p) { if (!good) { if (DEBUG_LOGGING) { - _cleanup_free_ char *iface = NULL; - iface = cescape(p); - if (!iface) - log_oom(); - else - log_debug("The interface %s is invalid as it contains special character %c", iface, *q); + _cleanup_free_ char *iface = cescape(p); + log_debug("The interface %s is invalid as it contains special character", strnull(iface)); } return false; }