From c8904b56f9c50410bc5e4360744242debb860e22 Mon Sep 17 00:00:00 2001 From: krw Date: Wed, 12 Apr 2017 12:22:25 +0000 Subject: [PATCH] Shuffle another function. --- sbin/dhclient/kroute.c | 42 +++++++++++++++++++++--------------------- 1 file 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 @@ -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; - } - } -} -- 2.20.1