From 6c68daf0988d1474ff10ace571a9a7e0d1f27f89 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Thu, 28 May 2020 21:31:58 +0200 Subject: executor: fix printing null master in netlink_device_change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The issues is only present with verbose debugging enabled. executor/common_linux.h: In function ‘void netlink_device_change(nlmsg*, int, const char*, bool, const char*, const void*, int, const char*)’: executor/common_linux.h:380:7: error: ‘%s’ directive argument is null [-Werror=format-overflow=] 380 | debug("netlink: device %s up master %s: %s\n", name, master, strerror(err)); --- executor/common_linux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'executor/common_linux.h') diff --git a/executor/common_linux.h b/executor/common_linux.h index ec4dba32c..b70729987 100644 --- a/executor/common_linux.h +++ b/executor/common_linux.h @@ -377,7 +377,7 @@ static void netlink_device_change(struct nlmsg* nlmsg, int sock, const char* nam if (macsize) netlink_attr(nlmsg, IFLA_ADDRESS, mac, macsize); int err = netlink_send(nlmsg, sock); - debug("netlink: device %s up master %s: %s\n", name, master, strerror(err)); + debug("netlink: device %s up master %s: %s\n", name, master ? master : "NULL", strerror(err)); (void)err; } #endif -- cgit mrf-deployment