summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorsf <sf@openbsd.org>2013-07-03 15:17:24 +0000
committersf <sf@openbsd.org>2013-07-03 15:17:24 +0000
commit44d364742f6f4473c88971e51107a1863b808eb5 (patch)
treeeaf372914d3d5035018b448bbfe5221f24ad0639 /sys
parentThe ipmi threshold value may be negative. Respect the sign bit (diff)
downloadwireguard-openbsd-44d364742f6f4473c88971e51107a1863b808eb5.tar.xz
wireguard-openbsd-44d364742f6f4473c88971e51107a1863b808eb5.zip
add support for %td for ptrdiff_t in kernel printf
this also adds support in gcc 4.x kprintf format checks ok kettenis@
Diffstat (limited to 'sys')
-rw-r--r--sys/kern/subr_prf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index 768d1647cf4..51f241bf39b 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: subr_prf.c,v 1.77 2013/03/28 16:55:25 deraadt Exp $ */
+/* $OpenBSD: subr_prf.c,v 1.78 2013/07/03 15:17:24 sf Exp $ */
/* $NetBSD: subr_prf.c,v 1.45 1997/10/24 18:14:25 chuck Exp $ */
/*-
@@ -842,6 +842,9 @@ reswitch: switch (ch) {
size = 1;
sign = '\0';
break;
+ case 't':
+ /* ptrdiff_t */
+ /* FALLTHROUGH */
case 'D':
flags |= LONGINT;
/*FALLTHROUGH*/