From: guy Date: Fri, 24 Sep 2004 18:18:00 +0000 (+0000) Subject: Include to declare "memset()". X-Git-Tag: tcpdump-3.9.1~275 X-Git-Url: https://git.tcpdump.org/tcpdump/commitdiff_plain/3be7baca5e616fdba50290da410185b248014461 Include to declare "memset()". Add a cast to squelch a compiler complaint. --- diff --git a/cpack.c b/cpack.c index d2e765d4..14c0a9ee 100644 --- a/cpack.c +++ b/cpack.c @@ -32,6 +32,7 @@ #endif #include +#include #include #include "cpack.h" @@ -132,7 +133,7 @@ int cpack_uint8(struct cpack_state *cs, u_int8_t *u) { /* No space left? */ - if (cs->c_next - cs->c_buf >= cs->c_len) + if ((size_t)(cs->c_next - cs->c_buf) >= cs->c_len) return -1; *u = *cs->c_next;