3
0
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:
Tomasz Bursztyka 2015-02-26 13:03:05 +02:00 committed by Denis Kenzior
parent b067c08cfe
commit 6b018ca6f7

View File

@ -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;