summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ypbind
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2018-04-26 15:55:14 +0000
committerguenther <guenther@openbsd.org>2018-04-26 15:55:14 +0000
commit6316a812ffce2a07760250a855370f709586d085 (patch)
tree817a308ccfb569fe5fcf952dc86fb13a140faba6 /usr.sbin/ypbind
parentNo need for two copies of tricky user input gathering code. Just use (diff)
downloadwireguard-openbsd-6316a812ffce2a07760250a855370f709586d085.tar.xz
wireguard-openbsd-6316a812ffce2a07760250a855370f709586d085.zip
Prefer <fcntl.h> over <sys/fcntl.h> in userland
While here, delete some extra #includes and apply style(9) sort rules. ok deraadt@ krw@ mpi@
Diffstat (limited to 'usr.sbin/ypbind')
-rw-r--r--usr.sbin/ypbind/ypbind.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c
index ef85d588728..944daef08d2 100644
--- a/usr.sbin/ypbind/ypbind.c
+++ b/usr.sbin/ypbind/ypbind.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypbind.c,v 1.71 2018/04/26 12:42:51 guenther Exp $ */
+/* $OpenBSD: ypbind.c,v 1.72 2018/04/26 15:55:14 guenther Exp $ */
/*
* Copyright (c) 1992, 1993, 1996, 1997, 1998 Theo de Raadt <deraadt@openbsd.org>
@@ -29,31 +29,32 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>
-#include <sys/fcntl.h>
#include <sys/uio.h>
#include <sys/syslog.h>
-#include <net/if.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <limits.h>
-#include <errno.h>
-#include <ctype.h>
-#include <netdb.h>
-#include <string.h>
-#include <dirent.h>
+#include <arpa/inet.h>
+#include <net/if.h>
#include <rpc/rpc.h>
#include <rpc/xdr.h>
-#include <arpa/inet.h>
#include <rpc/pmap_clnt.h>
#include <rpc/pmap_prot.h>
#include <rpc/pmap_rmt.h>
-#include <unistd.h>
-#include <err.h>
#include <rpcsvc/yp.h>
#include <rpcsvc/ypclnt.h>
+
+#include <ctype.h>
+#include <dirent.h>
+#include <err.h>
+#include <errno.h>
+#include <fcntl.h>
#include <ifaddrs.h>
+#include <limits.h>
+#include <netdb.h>
#include <poll.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
#define SERVERSDIR "/etc/yp"
#define BINDINGDIR "/var/yp/binding"