summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-18 15:19:34 +0000
committerJacek Masiulaniec <jacekm@cvs.openbsd.org>2008-12-18 15:19:34 +0000
commitcd97f2d013188e78333837912e193b09857df1fb (patch)
treefaf86e6cee5c1d683a8821a040bcb18b07fe1812
parenta5cecaa12864a93e4fe731b0b7f4888f6a87a523 (diff)
Don't err() on blank lines.
ok gilles@
-rw-r--r--usr.sbin/smtpd/makemap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/smtpd/makemap.c b/usr.sbin/smtpd/makemap.c
index 9772f545386..59c46f0cf2f 100644
--- a/usr.sbin/smtpd/makemap.c
+++ b/usr.sbin/smtpd/makemap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makemap.c,v 1.4 2008/12/17 23:09:23 jacekm Exp $ */
+/* $OpenBSD: makemap.c,v 1.5 2008/12/18 15:19:33 jacekm Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -162,6 +162,12 @@ parse_entry(char *line, size_t len, size_t lineno)
DBT key;
DBT val;
+ /* Blank lines are OK. */
+ while (isspace(*line))
+ line++;
+ if (*line == '\0')
+ return 1;
+
name = line;
switch (mode) {
case P_MAKEMAP: