From b1c81087121927b86541f31ad3e29ff94b35b53d Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Thu, 5 Nov 2009 12:24:14 +0000 Subject: 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. --- usr.sbin/smtpd/parse.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin') 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 @@ -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; -- cgit v1.2.3