mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 04:30:52 +07:00
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:
parent
822114aaf5
commit
1745ba4194
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user