summaryrefslogtreecommitdiff
path: root/usr.bin/vi
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-01-09 16:13:27 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-01-09 16:13:27 +0000
commit6931a4d8ecbf92e66631f7146c59fd9dc44636e7 (patch)
tree4652b40d72bf9b400358ce91feb1fb6912e01c23 /usr.bin/vi
parent13c212d7cdb70e0f5c6cc77b929ae15715dfda7e (diff)
decls before code; from Martijn van Duren
Diffstat (limited to 'usr.bin/vi')
-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;