From: Guy Harris Date: Sat, 4 Aug 2018 09:37:18 +0000 (-0700) Subject: We don't need to check LBL_ALIGN. X-Git-Tag: libpcap-1.10-bp~885 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/3548e14a58adae0384bf8cf204bec3345a401051 We don't need to check LBL_ALIGN. This code is only used on DEC OSF/1^W^WDigital UNIX^W^WTru64 UNIX, and that only runs on Alpha, and Alpha doesn't support unaligned loads, so we need to worry about alignment. --- diff --git a/pcap-pf.c b/pcap-pf.c index fde97bac..5cb9433b 100644 --- a/pcap-pf.c +++ b/pcap-pf.c @@ -104,9 +104,7 @@ pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user) register u_char *p, *bp; register int cc, n, buflen, inc; register struct enstamp *sp; -#ifdef LBL_ALIGN struct enstamp stamp; -#endif register u_int pad; again: @@ -164,12 +162,10 @@ pcap_read_pf(pcap_t *pc, int cnt, pcap_handler callback, u_char *user) "pf short read (%d)", cc); return (-1); } -#ifdef LBL_ALIGN if ((long)bp & 3) { sp = &stamp; memcpy((char *)sp, (char *)bp, sizeof(*sp)); } else -#endif sp = (struct enstamp *)bp; if (sp->ens_stamplen != sizeof(*sp)) { pcap_snprintf(pc->errbuf, sizeof(pc->errbuf),