summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2008-02-27 15:12:11 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2008-02-27 15:12:11 +0000
commit4f609e8c67f2c77e5f755e2a57fea77522b23b8c (patch)
treee155283c0ffbfd6b4a40e173b732b7bcf0196fee /usr.sbin
parent82a9a16697534c54fa269335670f0cad4b3800f4 (diff)
Unbreak parser by initializing topfile correctly.
I got fooled by patch(1). Sorry. Found by and OK thib@.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/snmpd/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y
index da0c6b4ce75..089cebdf5ff 100644
--- a/usr.sbin/snmpd/parse.y
+++ b/usr.sbin/snmpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.13 2008/02/27 10:30:11 mpf Exp $ */
+/* $OpenBSD: parse.y,v 1.14 2008/02/27 15:12:10 mpf Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@vantronix.net>
@@ -719,7 +719,6 @@ parse_config(const char *filename, u_int flags)
log_warn("cannot allocate memory");
return (NULL);
}
- topfile = file;
conf->sc_flags = flags;
conf->sc_confpath = filename;
@@ -734,6 +733,7 @@ parse_config(const char *filename, u_int flags)
free(conf);
return (NULL);
}
+ topfile = file;
setservent(1);
yyparse();