mirror of
https://github.com/the-tcpdump-group/tcpdump.git
synced 2024-11-23 18:14:29 +08:00
fix safeputc, the if statment was completely reversed
This commit is contained in:
parent
a9099326db
commit
76c5a0bdc1
6
util.c
6
util.c
@ -21,7 +21,7 @@
|
||||
|
||||
#ifndef lint
|
||||
static const char rcsid[] =
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.66 2000-06-10 08:11:12 assar Exp $ (LBL)";
|
||||
"@(#) $Header: /tcpdump/master/tcpdump/util.c,v 1.67 2000-06-21 09:08:34 itojun Exp $ (LBL)";
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -356,7 +356,7 @@ safeputchar(int c)
|
||||
|
||||
ch = (unsigned char)(c & 0xff);
|
||||
if (c < 0x80 && isprint(c))
|
||||
printf("\\%03o", c & 0xff);
|
||||
else
|
||||
printf("%c", c & 0xff);
|
||||
else
|
||||
printf("\\%03o", c & 0xff);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user