summaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2011-06-20 13:27:08 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2011-06-20 13:27:08 +0000
commit9fb04453a9422dbcf061dc5d9476fc549c4d6d72 (patch)
tree0425213a405c5f3ad4bd9bf8c9f103cf01ad5d93 /usr.bin/xlint
parent265d5938616e8dcfaf45e0258a6b10a7719bb777 (diff)
Prevent lint from warning about %m in C format strings. Quiets
false positives when check syslog(3) format strings that use %m. OK tedu@ martynas@
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint2/chk.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/xlint/lint2/chk.c b/usr.bin/xlint/lint2/chk.c
index 0d425876898..e8aae6adde9 100644
--- a/usr.bin/xlint/lint2/chk.c
+++ b/usr.bin/xlint/lint2/chk.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: chk.c,v 1.21 2011/06/18 22:29:59 tedu Exp $ */
+/* $OpenBSD: chk.c,v 1.22 2011/06/20 13:27:07 millert Exp $ */
/* $NetBSD: chk.c,v 1.2 1995/07/03 21:24:42 cgd Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: chk.c,v 1.21 2011/06/18 22:29:59 tedu Exp $";
+static char rcsid[] = "$OpenBSD: chk.c,v 1.22 2011/06/20 13:27:07 millert Exp $";
#endif
#include <stdlib.h>
@@ -798,7 +798,7 @@ printflike(hte_t *hte, fcall_t *call, int n, const char *fmt, type_t **ap)
if (sz != NOTSPEC)
fc = *fp++;
- if (fc == '%') {
+ if (fc == '%' || fc == 'm') {
if (sz != NOTSPEC || left || sign || space ||
alt || zero || prec || fwidth) {
badfmt(hte, call);