mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-01-08 15:52:32 +01:00
wiphy: Reduce static allocation size
iwd_device_get_path() is not going to produce longer string than 12 bytes (/ + maximum of uint32_t expressed as a string + '\0').
This commit is contained in:
parent
b067c08cfe
commit
6b018ca6f7
@ -319,7 +319,7 @@ static void network_free(void *data)
|
||||
|
||||
const char *iwd_device_get_path(struct netdev *netdev)
|
||||
{
|
||||
static char path[256];
|
||||
static char path[12];
|
||||
|
||||
snprintf(path, sizeof(path), "/%u", netdev->index);
|
||||
return path;
|
||||
|
Loading…
Reference in New Issue
Block a user