aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1997-12-28 05:03:33 +0000
committerBruce Evans <bde@FreeBSD.org>1997-12-28 05:03:33 +0000
commitf82057be9e948704052132816745ea598ade0434 (patch)
treef078a414a3b89d0fb83edb6f22fe8d251af760c2
parent09411a5af379568b71df161155a9557d15c8041e (diff)
downloadsrc-f82057be9e948704052132816745ea598ade0434.tar.gz
src-f82057be9e948704052132816745ea598ade0434.zip
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)).
Notes
Notes: svn path=/head/; revision=32041
-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 f166162a54f7..34191afe4f1d 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 *);