Fix some DIAGNOSTIC printf() formats; ntohl() provides a 32-bit quantity,

and should be printed with %x, not %lx.
This commit is contained in:
thorpej 1996-08-14 03:46:44 +00:00
parent 8781a4ebf9
commit 3ca11aa1ad
2 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: in_pcb.c,v 1.29 1996/07/10 18:13:35 cgd Exp $ */ /* $NetBSD: in_pcb.c,v 1.30 1996/08/14 03:46:48 thorpej Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1991, 1993 * Copyright (c) 1982, 1986, 1991, 1993
@ -586,7 +586,7 @@ in_pcbhashlookup(table, faddr, fport_arg, laddr, lport_arg)
} }
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
if (inp == NULL && in_pcbnotifymiss) { if (inp == NULL && in_pcbnotifymiss) {
printf("in_pcbhashlookup: faddr=%08lx fport=%d laddr=%08lx lport=%d\n", printf("in_pcbhashlookup: faddr=%08x fport=%d laddr=%08x lport=%d\n",
ntohl(faddr.s_addr), ntohs(fport), ntohl(faddr.s_addr), ntohs(fport),
ntohl(laddr.s_addr), ntohs(lport)); ntohl(laddr.s_addr), ntohs(lport));
} }

View File

@ -1,4 +1,4 @@
/* $NetBSD: ip_input.c,v 1.31 1996/07/10 18:13:39 cgd Exp $ */ /* $NetBSD: ip_input.c,v 1.32 1996/08/14 03:46:44 thorpej Exp $ */
/* /*
* Copyright (c) 1982, 1986, 1988, 1993 * Copyright (c) 1982, 1986, 1988, 1993
@ -914,7 +914,7 @@ ip_srcroute()
*(mtod(m, struct in_addr *)) = *p--; *(mtod(m, struct in_addr *)) = *p--;
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
if (ipprintfs) if (ipprintfs)
printf(" hops %lx", ntohl(mtod(m, struct in_addr *)->s_addr)); printf(" hops %x", ntohl(mtod(m, struct in_addr *)->s_addr));
#endif #endif
/* /*
@ -934,7 +934,7 @@ ip_srcroute()
while (p >= ip_srcrt.route) { while (p >= ip_srcrt.route) {
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
if (ipprintfs) if (ipprintfs)
printf(" %lx", ntohl(q->s_addr)); printf(" %x", ntohl(q->s_addr));
#endif #endif
*q++ = *p--; *q++ = *p--;
} }
@ -944,7 +944,7 @@ ip_srcroute()
*q = ip_srcrt.dst; *q = ip_srcrt.dst;
#ifdef DIAGNOSTIC #ifdef DIAGNOSTIC
if (ipprintfs) if (ipprintfs)
printf(" %lx\n", ntohl(q->s_addr)); printf(" %x\n", ntohl(q->s_addr));
#endif #endif
return (m); return (m);
} }