]> The Tcpdump Group git mirrors - tcpdump/commitdiff
fix safeputc, the if statment was completely reversed
authoritojun <itojun>
Wed, 21 Jun 2000 09:08:34 +0000 (09:08 +0000)
committeritojun <itojun>
Wed, 21 Jun 2000 09:08:34 +0000 (09:08 +0000)
util.c

diff --git a/util.c b/util.c
index 9571cbb594782be0fa6efc46a9a55c981866bd6b..7806a9f038db5990366fe18ea1d8d7f130b675d9 100644 (file)
--- a/util.c
+++ b/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);
 }