summaryrefslogtreecommitdiff
path: root/usr.bin/locate
diff options
context:
space:
mode:
authormmcc <mmcc@cvs.openbsd.org>2015-11-19 21:46:06 +0000
committermmcc <mmcc@cvs.openbsd.org>2015-11-19 21:46:06 +0000
commitdf24ec969a3af7df72e7f8c2c06a6ac1c23279f0 (patch)
tree1ffd2fcd2e4741bc4a3962c5fd693cef694cc270 /usr.bin/locate
parent6add882f0b5301a7618cec704a729d25f559c7c8 (diff)
Sort and simplify includes, remove a couple needless extern decls.
From Michael Reed. ok tedu@
Diffstat (limited to 'usr.bin/locate')
-rw-r--r--usr.bin/locate/locate/locate.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
index 1b38ced9c96..d04cac29cb9 100644
--- a/usr.bin/locate/locate/locate.c
+++ b/usr.bin/locate/locate/locate.c
@@ -1,5 +1,5 @@
/*
- * $OpenBSD: locate.c,v 1.30 2015/11/15 07:44:38 deraadt Exp $
+ * $OpenBSD: locate.c,v 1.31 2015/11/19 21:46:05 mmcc Exp $
*
* Copyright (c) 1995 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
* Copyright (c) 1989, 1993
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: locate.c,v 1.30 2015/11/15 07:44:38 deraadt Exp $
+ * $Id: locate.c,v 1.31 2015/11/19 21:46:05 mmcc Exp $
*/
/*
@@ -63,26 +63,21 @@
* in the standard 'find'.
*/
+#include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
#include <ctype.h>
#include <err.h>
+#include <fcntl.h>
#include <fnmatch.h>
#include <libgen.h>
+#include <limits.h>
#include <locale.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <limits.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-
-
-#ifdef sun
-#include <netinet/in.h> /* SunOS byteorder(3) htohl(3) */
-#endif
#include "locate.h"
#include "pathnames.h"
@@ -121,9 +116,6 @@ extern u_char *tolower_word(u_char *);
extern int check_bigram_char(int);
extern char *patprep(char *);
-extern char *optarg;
-extern int optind;
-
int
main(int argc, char *argv[])