diff options
author | 2017-04-12 12:22:25 +0000 | |
---|---|---|
committer | 2017-04-12 12:22:25 +0000 | |
commit | c8904b56f9c50410bc5e4360744242debb860e22 (patch) | |
tree | bae9730deb1c346f423b5011305ee42dabf1a610 | |
parent | Add comment how the test works. (diff) | |
download | wireguard-openbsd-c8904b56f9c50410bc5e4360744242debb860e22.tar.xz wireguard-openbsd-c8904b56f9c50410bc5e4360744242debb860e22.zip |
Shuffle another function.
-rw-r--r-- | sbin/dhclient/kroute.c | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sbin/dhclient/kroute.c b/sbin/dhclient/kroute.c index d5f06654099..5ac34c37880 100644 --- a/sbin/dhclient/kroute.c +++ b/sbin/dhclient/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.90 2017/04/11 13:59:27 krw Exp $ */ +/* $OpenBSD: kroute.c,v 1.91 2017/04/12 12:22:25 krw Exp $ */ /* * Copyright 2012 Kenneth R Westerback <krw@openbsd.org> @@ -50,6 +50,26 @@ #define ROUNDUP(a) \ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) +/* + * flush_unpriv_ibuf makes sure queued messages are delivered to the + * imsg socket. + */ +void +flush_unpriv_ibuf(const char *who) +{ + while (unpriv_ibuf->w.queued) { + if (msgbuf_write(&unpriv_ibuf->w) <= 0) { + if (errno == EAGAIN) + break; + if (quit == 0) + quit = INTERNALSIG; + if (errno != EPIPE && errno != 0) + log_warn("%s: msgbuf_write", who); + break; + } + } +} + struct in_addr active_addr; struct in_addr deleting; struct in_addr adding; @@ -1011,23 +1031,3 @@ populate_rti_info(struct sockaddr **rti_info, struct rt_msghdr *rtm) rti_info[i] = NULL; } } - -/* - * flush_unpriv_ibuf makes sure queued messages are delivered to the - * imsg socket. - */ -void -flush_unpriv_ibuf(const char *who) -{ - while (unpriv_ibuf->w.queued) { - if (msgbuf_write(&unpriv_ibuf->w) <= 0) { - if (errno == EAGAIN) - break; - if (quit == 0) - quit = INTERNALSIG; - if (errno != EPIPE && errno != 0) - log_warn("%s: msgbuf_write", who); - break; - } - } -} |