summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2016-01-09 16:13:26 +0000
committerderaadt <deraadt@openbsd.org>2016-01-09 16:13:26 +0000
commit7849ae1c6749c7401b938ae7add6f612b199daa5 (patch)
tree6d75a0b508f5475cb4b9de0fff03cf83bee77de4
parentadd a missing printf argument (diff)
downloadwireguard-openbsd-7849ae1c6749c7401b938ae7add6f612b199daa5.tar.xz
wireguard-openbsd-7849ae1c6749c7401b938ae7add6f612b199daa5.zip
decls before code; from Martijn van Duren
-rw-r--r--usr.bin/vi/common/main.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/vi/common/main.c b/usr.bin/vi/common/main.c
index 550a8edf4db..f0e2093b84d 100644
--- a/usr.bin/vi/common/main.c
+++ b/usr.bin/vi/common/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.32 2016/01/06 22:27:39 millert Exp $ */
+/* $OpenBSD: main.c,v 1.33 2016/01/09 16:13:26 deraadt Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -55,11 +55,6 @@ editor(GS *gp, int argc, char *argv[])
int ch, flagchk, lflag, secure, startup, readonly, rval, silent;
char *tag_f, *wsizearg, path[256];
- if (pledge("stdio rpath wpath cpath fattr flock getpw tty proc exec", NULL) == -1) {
- perror("pledge");
- goto err;
- }
-
static const char *optstr[3] = {
#ifdef DEBUG
"c:D:FlRrSsT:t:vw:",
@@ -72,6 +67,12 @@ editor(GS *gp, int argc, char *argv[])
#endif
};
+ if (pledge("stdio rpath wpath cpath fattr flock getpw tty proc exec",
+ NULL) == -1) {
+ perror("pledge");
+ goto err;
+ }
+
/* Initialize the busy routine, if not defined by the screen. */
if (gp->scr_busy == NULL)
gp->scr_busy = vs_busy;