diff options
author | Bill Fenner <fenner@FreeBSD.org> | 1998-09-15 19:36:32 +0000 |
---|---|---|
committer | Bill Fenner <fenner@FreeBSD.org> | 1998-09-15 19:36:32 +0000 |
commit | 4644f044b29b71b385396356b7cbf92b09e67628 (patch) | |
tree | 6bd786e664682d3877b9cca3efa525ac67d8e005 /contrib/tcpdump/print-atalk.c | |
parent | 4de76e31371f636d15e4005d6bed5755adb4c393 (diff) | |
download | src-4644f044b29b71b385396356b7cbf92b09e67628.tar.gz src-4644f044b29b71b385396356b7cbf92b09e67628.zip |
Virgin import of LBL tcpdump v3.4
Notes
Notes:
svn path=/vendor/tcpdump/dist/; revision=39297
Diffstat (limited to 'contrib/tcpdump/print-atalk.c')
-rw-r--r-- | contrib/tcpdump/print-atalk.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/contrib/tcpdump/print-atalk.c b/contrib/tcpdump/print-atalk.c index 3b6f1cdc9733..6ece6e77a2a3 100644 --- a/contrib/tcpdump/print-atalk.c +++ b/contrib/tcpdump/print-atalk.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996 + * Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -23,7 +23,7 @@ #ifndef lint static const char rcsid[] = - "@(#) $Header: print-atalk.c,v 1.45 96/12/10 23:24:07 leres Exp $ (LBL)"; + "@(#) $Header: print-atalk.c,v 1.48 97/05/28 12:50:58 leres Exp $ (LBL)"; #endif #include <sys/param.h> @@ -55,6 +55,7 @@ struct rtentry; #include "ethertype.h" #include "extract.h" /* must come after interface.h */ #include "appletalk.h" +#include "savestr.h" static struct tok type2str[] = { { ddpRTMP, "rtmp" }, @@ -405,11 +406,11 @@ print_cstring(register const char *cp, register const u_char *ep) length = *cp++; /* Spec says string can be at most 32 bytes long */ - if (length < 0 || length > 32) { - (void)printf("[len=%d]", length); + if (length > 32) { + (void)printf("[len=%u]", length); return (0); } - while (--length >= 0) { + while ((int)--length >= 0) { if (cp >= (char *)ep) { fputs(tstr, stdout); return (0); |