diff options
author | deraadt <deraadt@openbsd.org> | 2015-11-12 22:33:07 +0000 |
---|---|---|
committer | deraadt <deraadt@openbsd.org> | 2015-11-12 22:33:07 +0000 |
commit | 06049e53b884250e68f9ea5b5220dae091a50b13 (patch) | |
tree | 5521b2a09da1c0fbef7ae26f20cf4e2fbe18f64a /usr.sbin/ypserv | |
parent | Rename overly-long utf8data to ud throughout. (diff) | |
download | wireguard-openbsd-06049e53b884250e68f9ea5b5220dae091a50b13.tar.xz wireguard-openbsd-06049e53b884250e68f9ea5b5220dae091a50b13.zip |
use symbolics for flags to open
from Ricardo Mestre
Diffstat (limited to 'usr.sbin/ypserv')
-rw-r--r-- | usr.sbin/ypserv/ypserv/ypserv.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/ypserv/ypserv.c b/usr.sbin/ypserv/ypserv/ypserv.c index 539e21ebfcd..107916e2568 100644 --- a/usr.sbin/ypserv/ypserv/ypserv.c +++ b/usr.sbin/ypserv/ypserv/ypserv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ypserv.c,v 1.42 2015/10/26 10:12:46 deraadt Exp $ */ +/* $OpenBSD: ypserv.c,v 1.43 2015/11/12 22:33:07 deraadt Exp $ */ /* * Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se> @@ -451,10 +451,10 @@ main(int argc, char *argv[]) if (pid) exit(0); closefrom(0); - i = open("/dev/console", 2); + i = open("/dev/console", O_RDWR); (void) dup2(i, 1); (void) dup2(i, 2); - i = open("/dev/tty", 2); + i = open("/dev/tty", O_RDWR); if (i >= 0) { (void) ioctl(i, TIOCNOTTY, NULL); (void) close(i); |