diff options
author | fenner <fenner@FreeBSD.org> | 1998-09-15 19:46:59 +0000 |
---|---|---|
committer | fenner <fenner@FreeBSD.org> | 1998-09-15 19:46:59 +0000 |
commit | 03014afd0377fb8957d9c87572c96a6096b14d45 (patch) | |
tree | 06d0bbbc70fe36db13ceefd086607351b3abea15 /contrib/tcpdump/print-atalk.c | |
parent | 577b5b88b39bedc51620403e37d7e98cceb75351 (diff) | |
download | FreeBSD-src-03014afd0377fb8957d9c87572c96a6096b14d45.zip FreeBSD-src-03014afd0377fb8957d9c87572c96a6096b14d45.tar.gz |
Merge tcpdump 3.4
PR: bin/7877
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 c8e1c10..ba369d9 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" }, @@ -412,11 +413,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); |