summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWeibing Zhang <atheism.zhang@gmail.com>2016-11-06 13:14:14 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-11-07 10:01:17 +0100
commit1745ba41945db2c77d918e3bcad898f8259f7f5a (patch)
treec093e2f1bb523b8776666afdd0bcf5029bcb1162
parent822114aaf5eea275398f79e668f14e0cf39d0f17 (diff)
downloadlwn-1745ba41945db2c77d918e3bcad898f8259f7f5a.tar.gz
lwn-1745ba41945db2c77d918e3bcad898f8259f7f5a.zip
tools: hv: fix a compile warning in snprintf
hv_kvp_daemon.c: In function .kvp_mac_to_if_name.: hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security] snprintf(dev_id, sizeof(dev_id), kvp_net_dir); ^ hv_kvp_daemon.c:705:2: warning: format not a string literal and no format arguments [-Wformat-security] Signed-off-by: Weibing Zhang <atheism.zhang@gmail.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--tools/hv/hv_kvp_daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/hv/hv_kvp_daemon.c b/tools/hv/hv_kvp_daemon.c
index bc7adb84e679..bb0719b11475 100644
--- a/tools/hv/hv_kvp_daemon.c
+++ b/tools/hv/hv_kvp_daemon.c
@@ -702,7 +702,7 @@ static char *kvp_mac_to_if_name(char *mac)
if (dir == NULL)
return NULL;
- snprintf(dev_id, sizeof(dev_id), kvp_net_dir);
+ snprintf(dev_id, sizeof(dev_id), "%s", kvp_net_dir);
q = dev_id + strlen(kvp_net_dir);
while ((entry = readdir(dir)) != NULL) {