summaryrefslogtreecommitdiff
path: root/print-telnet.c
diff options
context:
space:
mode:
authoritojun <itojun>2000-06-03 16:40:35 +0000
committeritojun <itojun>2000-06-03 16:40:35 +0000
commite44561cc4845032894c6512e38986b0e0235876c (patch)
tree364afa4ea7e5b86e9588e12cd78cd76299e4403a /print-telnet.c
parentf2eaaa35725c6cb52e9e3947769fc6e7f2579dee (diff)
downloadtcpdump-e44561cc4845032894c6512e38986b0e0235876c.tar.gz
avoid possible infinite loop in relts_print().
move safeputchar() and safeputs() into util.c for better code sharing. some style.
Diffstat (limited to 'print-telnet.c')
-rw-r--r--print-telnet.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/print-telnet.c b/print-telnet.c
index ab8351f2..e0db8ee9 100644
--- a/print-telnet.c
+++ b/print-telnet.c
@@ -51,7 +51,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.7 2000-05-28 04:23:14 itojun Exp $";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-telnet.c,v 1.8 2000-06-03 16:40:35 itojun Exp $";
#endif
#include <sys/param.h>
@@ -83,22 +83,6 @@ static const char rcsid[] =
# define TELCMD_FIRST SE
#endif
-static void safeputs __P((const char *));
-
-#define safeputc(c) \
- printf((((unsigned char)c) < 0x80 && isprint((c)) ? "%c" : "\\%03o"), \
- ((unsigned char)c) & 0xff)
-
-static void
-safeputs(s)
- const char *s;
-{
- while (*s) {
- safeputc(*s);
- s++;
- }
-}
-
void
telnet_print(register const u_char *sp, u_int length)
{