From 94944e43da83d580736d9022736613d04ef5ce44 Mon Sep 17 00:00:00 2001 From: mickey Date: Thu, 6 Feb 1997 14:26:08 +0000 Subject: [PATCH] better heuristic for %p: assume l for x only if sizeof(void *)==sizeof(u_long), else it's u_int (; --- sys/lib/libsa/printf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/lib/libsa/printf.c b/sys/lib/libsa/printf.c index 1bfc3b18621..b1f4568afa2 100644 --- a/sys/lib/libsa/printf.c +++ b/sys/lib/libsa/printf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printf.c,v 1.7 1997/02/06 14:22:33 mickey Exp $ */ +/* $OpenBSD: printf.c,v 1.8 1997/02/06 14:26:08 mickey Exp $ */ /* $NetBSD: printf.c,v 1.10 1996/11/30 04:19:21 gwr Exp $ */ /*- @@ -206,7 +206,7 @@ reswitch: switch (ch = *fmt++) { kprintn(put, ul, 10); break; case 'p': - lflag++; + lflag += sizeof(void *)==sizeof(u_long)? 1 : 0; case 'x': ul = lflag ? va_arg(ap, u_long) : va_arg(ap, u_int); -- 2.20.1