Shuffle another function.
authorkrw <krw@openbsd.org>
Wed, 12 Apr 2017 12:22:25 +0000 (12:22 +0000)
committerkrw <krw@openbsd.org>
Wed, 12 Apr 2017 12:22:25 +0000 (12:22 +0000)
sbin/dhclient/kroute.c

index d5f0665..5ac34c3 100644 (file)
@@ -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>
 #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;
-               }
-       }
-}