diff options
author | jlemon <jlemon@FreeBSD.org> | 1997-08-18 20:48:35 +0000 |
---|---|---|
committer | jlemon <jlemon@FreeBSD.org> | 1997-08-18 20:48:35 +0000 |
commit | 667917cb165b00a17aecdda0a1a4417dbaedc55b (patch) | |
tree | 9b669ac8b9494bd7ca9fc5c7f59cafaf3b62b549 /usr.sbin/pwd_mkdb | |
parent | be2b748c02d9661a51580dc236248f47349ac3a4 (diff) | |
download | FreeBSD-src-667917cb165b00a17aecdda0a1a4417dbaedc55b.zip FreeBSD-src-667917cb165b00a17aecdda0a1a4417dbaedc55b.tar.gz |
db close routine actually writes data out to disk; return value was
not being checked. Change code to fail if db->close errors.
PR: 4202
Diffstat (limited to 'usr.sbin/pwd_mkdb')
-rw-r--r-- | usr.sbin/pwd_mkdb/pwd_mkdb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pwd_mkdb/pwd_mkdb.c b/usr.sbin/pwd_mkdb/pwd_mkdb.c index 9a7fbc4..4f0e177 100644 --- a/usr.sbin/pwd_mkdb/pwd_mkdb.c +++ b/usr.sbin/pwd_mkdb/pwd_mkdb.c @@ -405,8 +405,10 @@ main(argc, argv) error("put"); } - (void)(dp->close)(dp); - (void)(sdp->close)(sdp); + if ((dp->close)(dp) == -1) + error("close"); + if ((sdp->close)(sdp) == -1) + error("close"); if (makeold) { (void)fflush(oldfp); (void)fclose(oldfp); |