printf() pedant - even if we are sure that there's no %-formatted in a

varaiable, don't pass variable alone to printf().
From: kris@freebsd.org (FreeBSD-current usr.bin/hexdump/display.c 1.4 -> 1.6)
This commit is contained in:
itojun 2000-07-10 10:09:04 +00:00
parent 175e6ad859
commit 4806b1729d
1 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: display.c,v 1.8 1999/11/09 15:06:36 drochner Exp $ */
/* $NetBSD: display.c,v 1.9 2000/07/10 10:09:04 itojun Exp $ */
/*
* Copyright (c) 1989, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)display.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: display.c,v 1.8 1999/11/09 15:06:36 drochner Exp $");
__RCSID("$NetBSD: display.c,v 1.9 2000/07/10 10:09:04 itojun Exp $");
#endif
#endif /* not lint */
@ -111,7 +111,7 @@ display()
(void)printf(pr->fmt, (quad_t)eaddress);
break;
case F_TEXT:
(void)printf(pr->fmt);
(void)printf("%s", pr->fmt);
break;
}
}
@ -182,7 +182,7 @@ print(pr, bp)
(void)printf(pr->fmt, (char *)bp);
break;
case F_TEXT:
(void)printf(pr->fmt);
(void)printf("%s", pr->fmt);
break;
case F_U:
conv_u(pr, bp);