diff options
author | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-05 12:24:14 +0000 |
---|---|---|
committer | Gilles Chehade <gilles@cvs.openbsd.org> | 2009-11-05 12:24:14 +0000 |
commit | b1c81087121927b86541f31ad3e29ff94b35b53d (patch) | |
tree | fa454847b1c9418e96aa7921dddafb563588eb66 /usr.sbin/smtpd | |
parent | 906dfa15288823abe5b13a3024f601bbadeca35f (diff) |
some structures reference the maps they use by their id, if we allow 0 as a
valid map id, then we have no way to know for these structures if they have
a reference to a map, or if the member was not set. make map id start at 1.
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r-- | usr.sbin/smtpd/parse.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/parse.y b/usr.sbin/smtpd/parse.y index b6353a0e1a6..34daa852b4e 100644 --- a/usr.sbin/smtpd/parse.y +++ b/usr.sbin/smtpd/parse.y @@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.45 2009/11/03 22:57:41 gilles Exp $ */ +/* $OpenBSD: parse.y,v 1.46 2009/11/05 12:24:13 gilles Exp $ */ /* * Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org> @@ -85,7 +85,7 @@ char *symget(const char *); struct smtpd *conf = NULL; static int errors = 0; -objid_t last_map_id = 0; +objid_t last_map_id = 1; struct map *map = NULL; struct rule *rule = NULL; struct mapel_list *contents = NULL; @@ -1389,7 +1389,7 @@ parse_config(struct smtpd *x_conf, const char *filename, int opts) } errors = 0; - last_map_id = 0; + last_map_id = 1; map = NULL; rule = NULL; |