diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-02-06 14:26:09 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-02-06 14:26:09 +0000 |
commit | cbc9da633a370ad2d7f947c10d3955458adb2a00 (patch) | |
tree | df37c3f3ab758d86695b204234c462d7578726c9 | |
parent | 2e7326637e61f011d39058f6e99e26c9008c4a53 (diff) |
better heuristic for %p:
assume l for x only if sizeof(void *)==sizeof(u_long), else it's u_int (;
-rw-r--r-- | sys/lib/libsa/printf.c | 4 |
1 files 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); |