diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-02-26 08:18:57 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2004-02-26 08:18:57 +0000 |
commit | 7f28246c4f0d3653895dab150883eae74ff5b4b5 (patch) | |
tree | 5215693d78f2192a0f2afe13a78ed51a16ebbf6a /usr.sbin | |
parent | 3e2f267d7a634f03b8f16b9601f1d3042f227545 (diff) |
paranoia; beck ok
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/spamdb/spamdb.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.sbin/spamdb/spamdb.c b/usr.sbin/spamdb/spamdb.c index 930b131f06a..d0cae7913a9 100644 --- a/usr.sbin/spamdb/spamdb.c +++ b/usr.sbin/spamdb/spamdb.c @@ -1,3 +1,5 @@ +/* $OpenBSD: spamdb.c,v 1.2 2004/02/26 08:18:56 deraadt Exp $ */ + /* * Copyright (c) 2004 Bob Beck. All rights reserved. * @@ -146,15 +148,15 @@ 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); } - - int dblist(char *dbname) { @@ -207,21 +209,22 @@ dblist(char *dbname) } 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"); /* NOTREACHED */ return(-1); } - static int usage(void) { fprintf(stderr, "usage: spamdb [-a ip] [-d ip]\n"); - exit(-1); + exit(1); } int |