mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-25 13:00:16 +01:00
platform: use C99 static array index in parameter of nm_platform_if_indextoname()
It gives the compiler a possibility to warn about some misuses of the function.
This commit is contained in:
parent
2d3a1af5d6
commit
08f86ce04d
2 changed files with 3 additions and 2 deletions
|
|
@ -1322,7 +1322,7 @@ nm_platform_link_get_ifindex (NMPlatform *self, const char *name)
|
|||
}
|
||||
|
||||
const char *
|
||||
nm_platform_if_indextoname (NMPlatform *self, int ifindex, char *out_ifname/* of size IFNAMSIZ */)
|
||||
nm_platform_if_indextoname (NMPlatform *self, int ifindex, char out_ifname[static 16 /* IFNAMSIZ */])
|
||||
{
|
||||
_CHECK_SELF_NETNS (self, klass, netns, FALSE);
|
||||
|
||||
|
|
|
|||
|
|
@ -1350,7 +1350,8 @@ int nm_platform_sysctl_ip_conf_get_rp_filter_ipv4 (NMPlatform *platform,
|
|||
gboolean consider_all,
|
||||
gboolean *out_due_to_all);
|
||||
|
||||
const char *nm_platform_if_indextoname (NMPlatform *self, int ifindex, char *out_ifname/* of size IFNAMSIZ */);
|
||||
const char *nm_platform_if_indextoname (NMPlatform *self, int ifindex,
|
||||
char out_ifname[static 16 /* IFNAMSIZ */]);
|
||||
int nm_platform_if_nametoindex (NMPlatform *self, const char *ifname);
|
||||
|
||||
const NMPObject *nm_platform_link_get_obj (NMPlatform *self,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue