Clang related fixes:

* When calling syslog(), pass a format string.
* Define YY_NO_INPUT on nslexer.l

Submitted by:	Norberto Lopes <nlopes.ml at gmail.com>
This commit is contained in:
Rui Paulo 2010-10-13 16:57:06 +00:00
parent 1aee0aeb6d
commit 565424b2fd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=213785
2 changed files with 2 additions and 1 deletions

View File

@ -53,6 +53,7 @@ static char *rcsid =
#include "nsparser.h"
#define YY_NO_INPUT
#define YY_NO_UNPUT
%}

View File

@ -92,7 +92,7 @@ __fail(const char *msg)
(void)sigprocmask(SIG_BLOCK, &mask, NULL);
/* This may fail on a chroot jail... */
syslog(LOG_CRIT, msg);
syslog(LOG_CRIT, "%s", msg);
(void)memset(&sa, 0, sizeof(sa));
(void)sigemptyset(&sa.sa_mask);