]> The Tcpdump Group git mirrors - libpcap/commitdiff
We don't need to check LBL_ALIGN.
authorGuy Harris <[email protected]>
Sat, 4 Aug 2018 09:37:18 +0000 (02:37 -0700)
committerGuy Harris <[email protected]>
Sat, 4 Aug 2018 09:37:18 +0000 (02:37 -0700)
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.

pcap-pf.c

index fde97bacd05ecfd21c54f653b418c28d9aa5e708..5cb9433ba83ddba52be66cf1dbeee0cac2f54139 100644 (file)
--- 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),