Fiexd some build errors of ff_netstat with gcc-12.2.0.

This commit is contained in:
fengbojiang 2023-10-19 20:40:58 +08:00
parent 88d100facf
commit a26eb8eb00
2 changed files with 1 additions and 2 deletions

View File

@ -1710,7 +1710,6 @@ mlx5_sysfs_switch_info(unsigned int ifindex, struct mlx5_switch_info *info)
}
if (!real_if_indextoname(ifindex, ifname)) {
rte_errno = errno;
return -rte_errno;
}

View File

@ -393,7 +393,7 @@ intpr(void (*pfunc)(char *), int af)
case AF_LINK:
{
struct sockaddr_dl *sdl;
char linknum[10];
char linknum[sizeof("<Link#32767>")];
sdl = (struct sockaddr_dl *)ifa->ifa_addr;
sprintf(linknum, "<Link#%d>", sdl->sdl_index);