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>
This commit is contained in:
Weibing Zhang 2016-11-06 13:14:14 -08:00 committed by Greg Kroah-Hartman
parent 822114aaf5
commit 1745ba4194
1 changed files with 1 additions and 1 deletions

View File

@ -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) {