summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2004-03-11 17:49:00 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2004-03-11 17:49:00 +0000
commit73b8f29a262705f5dc5314dc16f27819fc95db13 (patch)
tree8039313ead55a73d81cc2722a82bbea9d95604e7
parent399fac6e9a5b28c4a2b401bd2e50fbc8ec2d71bd (diff)
Remove sync() calls that immediately precede databse close(). Since
close() calls sync() itself the standalone sync() is a no-op. OK beck@
-rw-r--r--libexec/spamd/grey.c4
-rw-r--r--libexec/spamlogd/spamlogd.c4
-rw-r--r--usr.sbin/spamdb/spamdb.c6
3 files changed, 3 insertions, 11 deletions
diff --git a/libexec/spamd/grey.c b/libexec/spamd/grey.c
index dc59b09292c..62fcccb6017 100644
--- a/libexec/spamd/grey.c
+++ b/libexec/spamd/grey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: grey.c,v 1.10 2004/03/11 17:29:50 beck Exp $ */
+/* $OpenBSD: grey.c,v 1.11 2004/03/11 17:48:59 millert Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -248,13 +248,11 @@ greyscan(char *dbname)
}
}
configure_pf(whitelist, whitecount);
- db->sync(db, 0);
db->close(db);
db = NULL;
freewhiteaddr();
return(0);
bad:
- db->sync(db, 0);
db->close(db);
db = NULL;
freewhiteaddr();
diff --git a/libexec/spamlogd/spamlogd.c b/libexec/spamlogd/spamlogd.c
index 708e4b942b6..3598872d037 100644
--- a/libexec/spamlogd/spamlogd.c
+++ b/libexec/spamlogd/spamlogd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamlogd.c,v 1.6 2004/03/10 00:35:55 deraadt Exp $ */
+/* $OpenBSD: spamlogd.c,v 1.7 2004/03/11 17:48:59 millert Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -108,12 +108,10 @@ dbupdate(char *dbname, char *ip)
goto bad;
}
}
- db->sync(db, 0);
db->close(db);
db = NULL;
return (0);
bad:
- db->sync(db, 0);
db->close(db);
db = NULL;
return (-1);
diff --git a/usr.sbin/spamdb/spamdb.c b/usr.sbin/spamdb/spamdb.c
index 8abd40545eb..67ee5e811b3 100644
--- a/usr.sbin/spamdb/spamdb.c
+++ b/usr.sbin/spamdb/spamdb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamdb.c,v 1.4 2004/03/01 17:47:07 beck Exp $ */
+/* $OpenBSD: spamdb.c,v 1.5 2004/03/11 17:48:59 millert Exp $ */
/*
* Copyright (c) 2004 Bob Beck. All rights reserved.
@@ -144,12 +144,10 @@ dbupdate(char *dbname, char *ip, int add)
}
}
}
- db->sync(db, 0);
db->close(db);
db = NULL;
return (0);
bad:
- db->sync(db, 0);
db->close(db);
db = NULL;
return(-1);
@@ -208,12 +206,10 @@ dblist(char *dbname)
gd.bcount, gd.pcount);
}
}
- db->sync(db, 0);
db->close(db);
db = NULL;
return(0);
bad:
- db->sync(db, 0);
db->close(db);
db = NULL;
errx(1, "incorrect db format entry");