mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-24 10:35:03 +08:00
Fix compile warning on BSD
This commit is contained in:
parent
1f88304a4e
commit
670118ad7f
7
dhcpcd.c
7
dhcpcd.c
@ -393,13 +393,14 @@ configure_interface(struct interface *ifp, int argc, char **argv)
|
||||
}
|
||||
|
||||
int
|
||||
handle_rename(unsigned int index, const char *ifname)
|
||||
handle_rename(unsigned int ifindex, const char *ifname)
|
||||
{
|
||||
struct interface *ifp;
|
||||
|
||||
TAILQ_FOREACH(ifp, ifaces, next) {
|
||||
if (ifp->index == index && strcmp(ifp->name, ifname)) {
|
||||
syslog(LOG_INFO, "%s: rename to %s", ifp->name, ifname);
|
||||
if (ifp->index == ifindex && strcmp(ifp->name, ifname)) {
|
||||
syslog(LOG_INFO, "%s: renamed to %s",
|
||||
ifp->name, ifname);
|
||||
strlcpy(ifp->name, ifname, sizeof(ifp->name));
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user