]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Fix review comments in added debug log.
authorGaurav <g.gupta@samsung.com>
Tue, 15 Dec 2020 10:11:46 +0000 (15:41 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 15 Dec 2020 16:47:03 +0000 (17:47 +0100)
src/libsystemd/sd-bus/bus-internal.c

index b74edda943356d8e5fc851c5c1145b15e7e81575..0f1ea45c08eef4cf8e6bccb3bc37b811d048c7c7 100644 (file)
@@ -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;
                         }