diff options
author | Weibing Zhang <atheism.zhang@gmail.com> | 2016-11-07 00:14:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-07 12:01:17 +0300 |
commit | 1745ba41945db2c77d918e3bcad898f8259f7f5a (patch) | |
tree | c093e2f1bb523b8776666afdd0bcf5029bcb1162 /tools/hv/hv_kvp_daemon.c | |
parent | 822114aaf5eea275398f79e668f14e0cf39d0f17 (diff) | |
download | linux-1745ba41945db2c77d918e3bcad898f8259f7f5a.tar.xz |
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>
Diffstat (limited to 'tools/hv/hv_kvp_daemon.c')
-rw-r--r-- | tools/hv/hv_kvp_daemon.c | 2 |
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) { |