diff options
author | Weibing Zhang <atheism.zhang@gmail.com> | 2016-11-06 22:14:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-07 10:01:17 +0100 |
commit | 1745ba41945db2c77d918e3bcad898f8259f7f5a (patch) | |
tree | c093e2f1bb523b8776666afdd0bcf5029bcb1162 | |
parent | tools: hv: remove unnecessary link flag (diff) | |
download | linux-1745ba41945db2c77d918e3bcad898f8259f7f5a.tar.xz linux-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.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) { |