summaryrefslogtreecommitdiffstats
path: root/usr.sbin/kvm_mkdb/kvm_mkdb.c
diff options
context:
space:
mode:
authorguenther <guenther@openbsd.org>2014-07-20 01:38:40 +0000
committerguenther <guenther@openbsd.org>2014-07-20 01:38:40 +0000
commitffb4dd050d1e35f39b1d6c1c600db7c6443475c2 (patch)
tree0e41db8f3c733eb324a6a362a29149f077ad4c74 /usr.sbin/kvm_mkdb/kvm_mkdb.c
parentDelete unused variables found by -Wall (diff)
downloadwireguard-openbsd-ffb4dd050d1e35f39b1d6c1c600db7c6443475c2.tar.xz
wireguard-openbsd-ffb4dd050d1e35f39b1d6c1c600db7c6443475c2.zip
Make sure the correct errno is reported by warn* or err* and not
the errno of an intervening cleanup operation like close/unlink/etc. Diff from Doug Hogan (doug (at) acyclic.org)
Diffstat (limited to 'usr.sbin/kvm_mkdb/kvm_mkdb.c')
-rw-r--r--usr.sbin/kvm_mkdb/kvm_mkdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/kvm_mkdb/kvm_mkdb.c b/usr.sbin/kvm_mkdb/kvm_mkdb.c
index e33d110bcee..cfd043af797 100644
--- a/usr.sbin/kvm_mkdb/kvm_mkdb.c
+++ b/usr.sbin/kvm_mkdb/kvm_mkdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kvm_mkdb.c,v 1.17 2009/10/27 23:59:51 deraadt Exp $ */
+/* $OpenBSD: kvm_mkdb.c,v 1.18 2014/07/20 01:38:40 guenther Exp $ */
/*-
* Copyright (c) 1990, 1993
@@ -161,8 +161,8 @@ kvm_mkdb(int fd, const char *dbdir, char *nlistpath, char *nlistname,
return(1);
}
if (create_knlist(nlistpath, fd, db) != 0) {
- (void)unlink(dbtemp);
warn("cannot determine executable type of %s", nlistpath);
+ (void)unlink(dbtemp);
return(1);
}
if (db->close(db)) {