提交 1745ba41 编写于 作者: W Weibing Zhang 提交者: Greg Kroah-Hartman

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: NWeibing Zhang <atheism.zhang@gmail.com>
Signed-off-by: NK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 822114aa
...@@ -702,7 +702,7 @@ static char *kvp_mac_to_if_name(char *mac) ...@@ -702,7 +702,7 @@ static char *kvp_mac_to_if_name(char *mac)
if (dir == NULL) if (dir == NULL)
return 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); q = dev_id + strlen(kvp_net_dir);
while ((entry = readdir(dir)) != NULL) { while ((entry = readdir(dir)) != NULL) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册