summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav <g.gupta@samsung.com>2020-12-15 15:41:46 +0530
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-12-15 17:47:03 +0100
commitfa8342228b29e6cc419ca27159617dccc321d668 (patch)
tree4a90d0860c5eb2a333f39042b7a5ca8421ae6970
parentd66b0ed4cc7423a6909c7228f48e196cfc51f788 (diff)
downloadsystemd-fa8342228b29e6cc419ca27159617dccc321d668.tar.gz
Fix review comments in added debug log.
-rw-r--r--src/libsystemd/sd-bus/bus-internal.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/libsystemd/sd-bus/bus-internal.c b/src/libsystemd/sd-bus/bus-internal.c
index b74edda943..0f1ea45c08 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;
}