Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/dist/tcpdump fix safeputchar(). sync w/ tcpdump.org
details: https://anonhg.NetBSD.org/src/rev/eb3fba265592
branches: trunk
changeset: 534091:eb3fba265592
user: itojun <itojun%NetBSD.org@localhost>
date: Tue Jul 16 04:17:46 2002 +0000
description:
fix safeputchar(). sync w/ tcpdump.org
diffstat:
dist/tcpdump/util.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (30 lines):
diff -r 841d0c0c1579 -r eb3fba265592 dist/tcpdump/util.c
--- a/dist/tcpdump/util.c Tue Jul 16 03:24:24 2002 +0000
+++ b/dist/tcpdump/util.c Tue Jul 16 04:17:46 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.3 2002/02/18 09:37:11 itojun Exp $ */
+/* $NetBSD: util.c,v 1.4 2002/07/16 04:17:46 itojun Exp $ */
/*
* Copyright (c) 1990, 1991, 1993, 1994, 1995, 1996, 1997
@@ -27,7 +27,7 @@
static const char rcsid[] =
"@(#) Header: /tcpdump/master/tcpdump/util.c,v 1.72 2001/10/08 16:12:13 fenner Exp (LBL)";
#else
-__RCSID("$NetBSD: util.c,v 1.3 2002/02/18 09:37:11 itojun Exp $");
+__RCSID("$NetBSD: util.c,v 1.4 2002/07/16 04:17:46 itojun Exp $");
#endif
#endif
@@ -361,8 +361,8 @@
unsigned char ch;
ch = (unsigned char)(c & 0xff);
- if (c < 0x80 && isprint(c))
- printf("%c", c & 0xff);
+ if (ch < 0x80 && isprint(ch))
+ printf("%c", ch);
else
- printf("\\%03o", c & 0xff);
+ printf("\\%03o", ch);
}
Home |
Main Index |
Thread Index |
Old Index