summaryrefslogtreecommitdiffstats
path: root/usr.sbin/vipw
diff options
context:
space:
mode:
authordillon <dillon@FreeBSD.org>1998-12-13 01:39:32 +0000
committerdillon <dillon@FreeBSD.org>1998-12-13 01:39:32 +0000
commit3fa521a2d22918cde2e1652bcc39d746469720ab (patch)
tree9d9af574a781d8a5e57e319cb5028665e9d9dea6 /usr.sbin/vipw
parent99ae894df3a3aa57ec1410174bbf65f764fbd9b5 (diff)
downloadFreeBSD-src-3fa521a2d22918cde2e1652bcc39d746469720ab.zip
FreeBSD-src-3fa521a2d22918cde2e1652bcc39d746469720ab.tar.gz
oops. Fix indentation of the 'for' loop I just added.
Diffstat (limited to 'usr.sbin/vipw')
-rw-r--r--usr.sbin/vipw/pw_util.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/usr.sbin/vipw/pw_util.c b/usr.sbin/vipw/pw_util.c
index 93bf4e1..2003cd6 100644
--- a/usr.sbin/vipw/pw_util.c
+++ b/usr.sbin/vipw/pw_util.c
@@ -36,7 +36,7 @@
static const char sccsid[] = "@(#)pw_util.c 8.3 (Berkeley) 4/2/94";
#endif
static const char rcsid[] =
- "$Id: pw_util.c,v 1.11 1998/10/20 11:34:11 des Exp $";
+ "$Id: pw_util.c,v 1.12 1998/12/13 01:36:45 dillon Exp $";
#endif /* not lint */
/*
@@ -116,25 +116,25 @@ pw_lock()
* Open should allow flock'ing the file; see 4.4BSD. XXX
*/
for (;;) {
- struct stat st;
+ struct stat st;
- lockfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
- if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1)
- err(1, "%s", _PATH_MASTERPASSWD);
- if (flock(lockfd, LOCK_EX|LOCK_NB))
- errx(1, "the password db file is busy");
+ lockfd = open(_PATH_MASTERPASSWD, O_RDONLY, 0);
+ if (lockfd < 0 || fcntl(lockfd, F_SETFD, 1) == -1)
+ err(1, "%s", _PATH_MASTERPASSWD);
+ if (flock(lockfd, LOCK_EX|LOCK_NB))
+ errx(1, "the password db file is busy");
- /*
- * If the password file was replaced while we were trying to
- * get the lock, our hardlink count will be 0 and we have to
- * close and retry.
- */
- if (fstat(lockfd, &st) < 0)
- errx(1, "fstat() failed");
- if (st.st_nlink != 0)
- break;
- close(lockfd);
- lockfd = -1;
+ /*
+ * If the password file was replaced while we were trying to
+ * get the lock, our hardlink count will be 0 and we have to
+ * close and retry.
+ */
+ if (fstat(lockfd, &st) < 0)
+ errx(1, "fstat() failed");
+ if (st.st_nlink != 0)
+ break;
+ close(lockfd);
+ lockfd = -1;
}
return (lockfd);
}
OpenPOWER on IntegriCloud