summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2017-07-28 13:15:33 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2017-07-28 13:15:33 +0000
commitc3e514a2ab1ef7c8790ed58c54e2199f378f9a91 (patch)
tree1f5c2cfc07764206e6842c7b603ae0f0da05f87f
parent9c1b07f98d6a82f6555f1cb5c8240afab356fc88 (diff)
Use a format string for yyerror when printing a variable string.
Pointed out by clang. (Not really a problem here since we control the string, but these things tend to get coppied around) ok gerhard@
-rw-r--r--usr.sbin/snmpd/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/snmpd/parse.y b/usr.sbin/snmpd/parse.y
index efd1159c3ab..26cd6b999fb 100644
--- a/usr.sbin/snmpd/parse.y
+++ b/usr.sbin/snmpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.43 2017/01/05 13:53:10 krw Exp $ */
+/* $OpenBSD: parse.y,v 1.44 2017/07/28 13:15:32 florian Exp $ */
/*
* Copyright (c) 2007, 2008, 2012 Reyk Floeter <reyk@openbsd.org>
@@ -273,14 +273,14 @@ main : LISTEN ON STRING {
const char *errstr;
user = usm_newuser($2, &errstr);
if (user == NULL) {
- yyerror(errstr);
+ yyerror("%s", errstr);
free($2);
YYERROR;
}
} userspecs {
const char *errstr;
if (usm_checkuser(user, &errstr) < 0) {
- yyerror(errstr);
+ yyerror("%s", errstr);
YYERROR;
}
user = NULL;