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)
|
const char *iwd_device_get_path(struct netdev *netdev)
|
||||||
{
|
{
|
||||||
static char path[256];
|
static char path[12];
|
||||||
|
|
||||||
snprintf(path, sizeof(path), "/%u", netdev->index);
|
snprintf(path, sizeof(path), "/%u", netdev->index);
|
||||||
return path;
|
return path;
|
||||||
|
|
Loading…
Reference in New Issue