diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-09 14:47:04 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-01-10 11:03:27 +0100 |
commit | 0577772720a4ecb050a230f75346f90b246e93c8 (patch) | |
tree | a3fba8bb57e77c932e08dd0d4bbe49adb6312e5e /freebsd/sbin/dhclient | |
parent | Update to FreeBSD head 2016-12-10 (diff) | |
download | rtems-libbsd-0577772720a4ecb050a230f75346f90b246e93c8.tar.bz2 |
Update to FreeBSD head 2017-01-09
Git mirror commit 1f8e4a995a6ede4bdb24e6d335ccda2bdb0175ab.
Diffstat (limited to 'freebsd/sbin/dhclient')
-rw-r--r-- | freebsd/sbin/dhclient/dispatch.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/freebsd/sbin/dhclient/dispatch.c b/freebsd/sbin/dhclient/dispatch.c index d37c9925..c0eee929 100644 --- a/freebsd/sbin/dhclient/dispatch.c +++ b/freebsd/sbin/dhclient/dispatch.c @@ -456,16 +456,12 @@ add_protocol(char *name, int fd, void (*handler)(struct protocol *), void remove_protocol(struct protocol *proto) { - struct protocol *p, *next, *prev; + struct protocol *p, *next; - prev = NULL; for (p = protocols; p; p = next) { next = p->next; if (p == proto) { - if (prev) - prev->next = p->next; - else - protocols = p->next; + protocols = p->next; free(p); } } |