diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-07-28 20:51:51 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-07-28 20:51:51 +0000 |
commit | 72295dbedd1af93b332f58095676e3fa24e412ab (patch) | |
tree | 6af504968236429e1d9f599bd279ee8b90188526 /usr.sbin/smtpd | |
parent | fb67b58e4d4baf34a4311f527a56c183d9117feb (diff) |
slightly change how makemap parses its lines so that we consider #
as a comment only when it starts a line or is preceded by whitespaces.
fixes a bug that was reported to me twice and which i ran into,
ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/makemap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/makemap.c b/usr.sbin/smtpd/makemap.c index bea29b68d2b..81bd15943ad 100644 --- a/usr.sbin/smtpd/makemap.c +++ b/usr.sbin/smtpd/makemap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makemap.c,v 1.18 2009/05/30 23:53:41 gilles Exp $ */ +/* $OpenBSD: makemap.c,v 1.19 2009/07/28 20:51:50 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -186,7 +186,7 @@ parse_map(char *filename) char *line; size_t len; size_t lineno = 0; - char delim[] = { '\\', '\\', '#' }; + char delim[] = { '\\', 0, 0 }; fp = fopen(filename, "r"); if (fp == NULL) { @@ -227,7 +227,7 @@ parse_entry(char *line, size_t len, size_t lineno) keyp = line; while (isspace(*keyp)) keyp++; - if (*keyp == '\0') + if (*keyp == '\0' || *keyp == '#') return 1; valp = keyp; |