summaryrefslogtreecommitdiff
path: root/usr.sbin/dhcpd/db.c
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2017-02-13 23:04:06 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2017-02-13 23:04:06 +0000
commit26271ee4f3cee91f8155804da321edf88e654e31 (patch)
treec56cd3898c1ef630bc075d370b10075dadf5de14 /usr.sbin/dhcpd/db.c
parenta6dc8390db2f6845eca6f615f527524e8611ec9e (diff)
Eliminate pointless'%m' (a.k.a. hand rolled strerror()) by using fatal() and
log_warn(). Zap a couple of explicit 'syslog()' calls.
Diffstat (limited to 'usr.sbin/dhcpd/db.c')
-rw-r--r--usr.sbin/dhcpd/db.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/dhcpd/db.c b/usr.sbin/dhcpd/db.c
index cc153373da4..295e522b1ce 100644
--- a/usr.sbin/dhcpd/db.c
+++ b/usr.sbin/dhcpd/db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: db.c,v 1.17 2017/02/13 19:13:14 krw Exp $ */
+/* $OpenBSD: db.c,v 1.18 2017/02/13 23:04:05 krw Exp $ */
/*
* Persistent database management routines for DHCPD.
@@ -168,12 +168,12 @@ commit_leases(void)
* rewrite fails.
*/
if (fflush(db_file) == EOF) {
- log_info("commit_leases: unable to commit: %m");
+ log_warn("commit_leases: unable to commit");
return (0);
}
if (fsync(fileno(db_file)) == -1) {
- log_info("commit_leases: unable to commit: %m");
+ log_warn("commit_leases: unable to commit");
return (0);
}
@@ -198,7 +198,7 @@ db_startup(void)
/* open lease file. once we dropped privs it has to stay open */
db_fd = open(path_dhcpd_db, O_WRONLY|O_CREAT, 0640);
if (db_fd == -1)
- fatalx("Can't create new lease file: %m");
+ fatal("Can't create new lease file");
if ((db_file = fdopen(db_fd, "w")) == NULL)
fatalx("Can't fdopen new lease file!");