diff options
| author | Bill Fenner <fenner@FreeBSD.org> | 1998-09-15 19:46:59 +0000 |
|---|---|---|
| committer | Bill Fenner <fenner@FreeBSD.org> | 1998-09-15 19:46:59 +0000 |
| commit | 699fc31439c6d227def4f2fdf7b4f4c5f3d02828 (patch) | |
| tree | 0f65e43947993b82a8cd54d6bbd653f4940945a5 /contrib/tcpdump/print-isoclns.c | |
| parent | 90dc276c84c804d608fad6d71f9daf536f2203a3 (diff) | |
Notes
Diffstat (limited to 'contrib/tcpdump/print-isoclns.c')
| -rw-r--r-- | contrib/tcpdump/print-isoclns.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/tcpdump/print-isoclns.c b/contrib/tcpdump/print-isoclns.c index 376cbbac9e2c..7af4f8f8a836 100644 --- a/contrib/tcpdump/print-isoclns.c +++ b/contrib/tcpdump/print-isoclns.c @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: print-isoclns.c,v 1.14 96/12/10 23:26:56 leres Exp $ (LBL)"; + "@(#) $Header: print-isoclns.c,v 1.15 96/12/31 21:27:41 leres Exp $ (LBL)"; #endif #include <sys/types.h> @@ -283,7 +283,7 @@ esis_print(const u_char *p, u_int length) printf(" bad pkt!"); else { printf(" too short for esis header %d:", li); - while (--length >= 0) + while (--length != 0) printf("%02X", *p++); } return; @@ -663,7 +663,8 @@ osi_cksum(register const u_char *p, register int len, u_char *off) if ((off[0] == 0) && (off[1] == 0)) return 0; - while (--len >= 0) { + off[0] = off[1] = 0; + while ((int)--len >= 0) { c0 += *p++; c0 %= 255; c1 += c0; |
