diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1995-04-02 03:10:55 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1995-04-02 03:10:55 +0000 |
| commit | 9f3db41ff542539e8954c7c20757d4664c84777d (patch) | |
| tree | 055cb8180f07534267e707da7c179e6cb3eb2870 /usr.sbin/ypbind | |
| parent | df561fc41455e9cf81d851a15f4e385aed34cf6e (diff) | |
Notes
Diffstat (limited to 'usr.sbin/ypbind')
| -rw-r--r-- | usr.sbin/ypbind/ypbind.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/ypbind/ypbind.c b/usr.sbin/ypbind/ypbind.c index 55c8d15f8744..fc322a1d2f8c 100644 --- a/usr.sbin/ypbind/ypbind.c +++ b/usr.sbin/ypbind/ypbind.c @@ -28,7 +28,7 @@ */ #ifndef LINT -static char rcsid[] = "$Id: ypbind.c,v 1.3 1995/02/16 01:21:44 wpaul Exp $"; +static char rcsid[] = "$Id: ypbind.c,v 1.4 1995/02/26 04:42:48 wpaul Exp $"; #endif #include <sys/param.h> @@ -713,15 +713,15 @@ int force; sprintf(path, "%s/%s.%d", BINDINGDIR, ypdb->dom_domain, ypdb->dom_vers); #ifdef O_SHLOCK - if( (fd=open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) { + if( (fd=open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) < 0) { (void)mkdir(BINDINGDIR, 0755); - if( (fd=open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) == -1) + if( (fd=open(path, O_CREAT|O_SHLOCK|O_RDWR|O_TRUNC, 0644)) < 0) return; } #else - if( (fd=open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1) { + if( (fd=open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) < 0) { (void)mkdir(BINDINGDIR, 0755); - if( (fd=open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) == -1) + if( (fd=open(path, O_CREAT|O_RDWR|O_TRUNC, 0644)) < 0) return; } flock(fd, LOCK_SH); |
