redo the previous (rev.1.2) differently. use t modifier.

This commit is contained in:
yamt 2004-10-07 10:29:46 +00:00
parent 8041597c55
commit 9351f524bd
1 changed files with 2 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $Id: getdents.c,v 1.2 2004/10/04 22:33:16 he Exp $ */
/* $Id: getdents.c,v 1.3 2004/10/07 10:29:46 yamt Exp $ */
/*-
* Copyright (c)2004 YAMAMOTO Takashi,
@ -59,8 +59,7 @@ print_dents(FILE *fp, const void *vp, int sz)
for (cp = vp, i = 0; cp < ep; cp++, i++) {
if ((i % 16) == 0)
fprintf(fp, "%08x:",
(int)(cp - (const char *)vp));
fprintf(fp, "%08tx:", cp - (const char *)vp);
fprintf(fp, "%02x ", (int)(unsigned char)*cp);
if ((i % 16) == 15)
fprintf(fp, "\n");