Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154545469
D1814.id4201.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
782 B
Referenced Files
None
Subscribers
None
D1814.id4201.diff
View Options
Index: sbin/ifconfig/ifconfig.c
===================================================================
--- sbin/ifconfig/ifconfig.c
+++ sbin/ifconfig/ifconfig.c
@@ -1280,9 +1280,8 @@
}
/* turn interface and unit into module name */
- strcpy(ifkind, "if_");
- strlcpy(ifkind + MOD_PREFIX_LEN, ifname,
- sizeof(ifkind) - MOD_PREFIX_LEN);
+ strlcpy(ifkind, "if_", sizeof(ifkind));
+ strlcat(ifkind, ifname, sizeof(ifkind));
/* scan files in kernel */
mstat.version = sizeof(struct module_stat);
@@ -1299,8 +1298,8 @@
cp = mstat.name;
}
/* already loaded? */
- if (strncmp(ifname, cp, strlen(ifname) + 1) == 0 ||
- strncmp(ifkind, cp, strlen(ifkind) + 1) == 0)
+ if (strcmp(ifname, cp) == 0 ||
+ strcmp(ifkind, cp) == 0)
return;
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Apr 29, 9:23 PM (2 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32396800
Default Alt Text
D1814.id4201.diff (782 B)
Attached To
Mode
D1814: Simplify string mangling in ifmaybeload().
Attached
Detach File
Event Timeline
Log In to Comment