diff options
-rw-r--r-- | sbin/dhclient/dhclient.c | 18 | ||||
-rw-r--r-- | sbin/dhclient/dispatch.c | 4 | ||||
-rw-r--r-- | sbin/dhclient/kroute.c | 10 |
3 files changed, 16 insertions, 16 deletions
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index 773c7668c67..f20370e3a27 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dhclient.c,v 1.257 2013/06/18 17:02:41 krw Exp $ */ +/* $OpenBSD: dhclient.c,v 1.258 2013/07/05 22:13:10 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -1856,7 +1856,7 @@ fork_privchld(int fd, int fd2) quit = INTERNALSIG; } continue; - } + } if (nfds == 0 || !(pfd[0].revents & POLLIN)) continue; @@ -1910,7 +1910,7 @@ fork_privchld(int fd, int fd2) if (quit != INTERNALSIG) warning("%s; exiting", strsignal(quit)); - + exit(1); } @@ -2063,7 +2063,7 @@ apply_defaults(struct client_lease *lease) if (newlease->options[i].len != 0) free(newlease->options[i].data); newlease->options[i].len = config->defaults[i].len; - newlease->options[i].data = calloc(1, + newlease->options[i].data = calloc(1, config->defaults[i].len); if (newlease->options[i].data == NULL) goto cleanup; @@ -2082,7 +2082,7 @@ apply_defaults(struct client_lease *lease) goto cleanup; memcpy(newlease->options[i].data, config->defaults[i].data, config->defaults[i].len); - memcpy(newlease->options[i].data + + memcpy(newlease->options[i].data + config->defaults[i].len, lease->options[i].data, lease->options[i].len); break; @@ -2098,7 +2098,7 @@ apply_defaults(struct client_lease *lease) goto cleanup; memcpy(newlease->options[i].data, lease->options[i].data, lease->options[i].len); - memcpy(newlease->options[i].data + + memcpy(newlease->options[i].data + lease->options[i].len, config->defaults[i].data, config->defaults[i].len); break; @@ -2108,7 +2108,7 @@ apply_defaults(struct client_lease *lease) (config->defaults[i].len != 0)) { newlease->options[i].len = config->defaults[i].len; - newlease->options[i].data = calloc(1, + newlease->options[i].data = calloc(1, config->defaults[i].len); if (newlease->options[i].data == NULL) goto cleanup; @@ -2330,7 +2330,7 @@ add_default_route(int rdomain, struct in_addr addr, struct in_addr gateway) flags |= RTF_GATEWAY | RTF_STATIC; } - add_route(rdomain, dest, netmask, gateway, addrs, flags); + add_route(rdomain, dest, netmask, gateway, addrs, flags); } void @@ -2372,7 +2372,7 @@ void add_classless_static_routes(int rdomain, memset(&netmask, 0, sizeof(netmask)); if (bits) - netmask.s_addr = htonl(0xffffffff << (32 - bits)); + netmask.s_addr = htonl(0xffffffff << (32 - bits)); memset(&dest, 0, sizeof(dest)); memcpy(&dest, &classless_static_routes->data[i], bytes); diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c index 7d29ea6b40e..192824b7869 100644 --- a/sbin/dhclient/dispatch.c +++ b/sbin/dhclient/dispatch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dispatch.c,v 1.79 2013/05/10 18:59:22 krw Exp $ */ +/* $OpenBSD: dispatch.c,v 1.80 2013/07/05 22:13:10 krw Exp $ */ /* * Copyright 2004 Henning Brauer <henning@openbsd.org> @@ -363,7 +363,7 @@ set_timeout(time_t when, void (*where)(void)) void set_timeout_interval(time_t secs, void (*where)(void)) { - timeout.when = time(NULL) + secs; + timeout.when = time(NULL) + secs; timeout.func = where; } diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index eda78953b6f..87e1aa0f3fb 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.54 2013/06/09 22:39:51 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.55 2013/07/05 22:13:10 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -43,7 +43,7 @@ void delete_route(int, int, struct rt_msghdr *); #define ROUTE_LABEL_DHCLIENT_DEAD 6 /* - * Do equivalent of + * Do equivalent of * * route -q $rdomain -n flush -inet -iface $interface * arp -dan @@ -155,7 +155,7 @@ priv_flush_routes(struct imsg_flush_routes *imsg) /* Delete default routes on our interface. */ memset(ifname, 0, sizeof(ifname)); if (if_indextoname(rtm->rtm_index, ifname) && - sa_in && + sa_in && sa_in->sin_addr.s_addr == INADDR_ANY && rtm->rtm_tableid == imsg->rdomain && strcmp(imsg->ifname, ifname) == 0) @@ -389,7 +389,7 @@ add_address(char *ifname, int rdomain, struct in_addr addr, { struct imsg_add_address imsg; int rslt; - + memset(&imsg, 0, sizeof(imsg)); /* Note the address we are adding for RTM_NEWADDR filtering! */ @@ -399,7 +399,7 @@ add_address(char *ifname, int rdomain, struct in_addr addr, imsg.rdomain = rdomain; imsg.addr = addr; imsg.mask = mask; - + rslt = imsg_compose(unpriv_ibuf, IMSG_ADD_ADDRESS, 0, 0, -1, &imsg, sizeof(imsg)); |