Space.c (446279168e030fd0ed68e2bba336bef8bb3da352) | Space.c (fb3ceec187e8bca474340e361a18163a2e79c0a2) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * INET An implementation of the TCP/IP protocol suite for the LINUX 4 * operating system. INET is implemented using the BSD Socket 5 * interface as the means of communication with the user level. 6 * 7 * Holds initial configuration information for devices. 8 * --- 54 unchanged lines hidden (view full) --- 63{ 64 struct netdev_boot_setup *s; 65 int i; 66 67 s = dev_boot_setup; 68 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 69 if (s[i].name[0] == '\0' || s[i].name[0] == ' ') { 70 memset(s[i].name, 0, sizeof(s[i].name)); | 1// SPDX-License-Identifier: GPL-2.0-or-later 2/* 3 * INET An implementation of the TCP/IP protocol suite for the LINUX 4 * operating system. INET is implemented using the BSD Socket 5 * interface as the means of communication with the user level. 6 * 7 * Holds initial configuration information for devices. 8 * --- 54 unchanged lines hidden (view full) --- 63{ 64 struct netdev_boot_setup *s; 65 int i; 66 67 s = dev_boot_setup; 68 for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++) { 69 if (s[i].name[0] == '\0' || s[i].name[0] == ' ') { 70 memset(s[i].name, 0, sizeof(s[i].name)); |
71 strlcpy(s[i].name, name, IFNAMSIZ); | 71 strscpy(s[i].name, name, IFNAMSIZ); |
72 memcpy(&s[i].map, map, sizeof(s[i].map)); 73 break; 74 } 75 } 76 77 return i >= NETDEV_BOOT_SETUP_MAX ? 0 : 1; 78} 79 --- 180 unchanged lines hidden --- | 72 memcpy(&s[i].map, map, sizeof(s[i].map)); 73 break; 74 } 75 } 76 77 return i >= NETDEV_BOOT_SETUP_MAX ? 0 : 1; 78} 79 --- 180 unchanged lines hidden --- |