summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_prf.c
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1997-12-28 05:03:33 +0000
committerbde <bde@FreeBSD.org>1997-12-28 05:03:33 +0000
commite24f5de85f72ddce45fa50297bcc1a1d25a9b943 (patch)
treea7f5ca01e52de78e4c121712419cf45a45cc53dc /sys/kern/subr_prf.c
parent82e6e7f1f010d91452fe9563cfc2045d176f225a (diff)
downloadFreeBSD-src-e24f5de85f72ddce45fa50297bcc1a1d25a9b943.zip
FreeBSD-src-e24f5de85f72ddce45fa50297bcc1a1d25a9b943.tar.gz
Handle "%...p" as "%#...x" instead of "0x%...x". This is a quick fix
for field widths being 2 larger than specified for "%<number>p". Only printing of null pointers is "wrong" now (it is actually "right", but inconsistent with printf(3)).
Diffstat (limited to 'sys/kern/subr_prf.c')
-rw-r--r--sys/kern/subr_prf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/kern/subr_prf.c b/sys/kern/subr_prf.c
index f166162..34191af 100644
--- a/sys/kern/subr_prf.c
+++ b/sys/kern/subr_prf.c
@@ -36,7 +36,7 @@
* SUCH DAMAGE.
*
* @(#)subr_prf.c 8.3 (Berkeley) 1/21/94
- * $Id: subr_prf.c,v 1.42 1997/09/02 20:05:51 bde Exp $
+ * $Id: subr_prf.c,v 1.43 1997/10/12 20:23:58 phk Exp $
*/
#include <sys/param.h>
@@ -499,8 +499,7 @@ reswitch: switch (ch = (u_char)*fmt++) {
case 'p':
ul = (u_long)va_arg(ap, void *);
base = 16;
- PCHAR('0');
- PCHAR('x');
+ sharpflag = 1;
goto number;
case 's':
p = va_arg(ap, char *);
OpenPOWER on IntegriCloud