]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-sl.c
Use pointer expressions like in most similar cases
[tcpdump] / print-sl.c
index 7cac2aa482232f07e34c2c63dd8ded873a65933b..774c634371ba3e1d67f67e12bd24af65aaf82da9 100644 (file)
@@ -167,7 +167,7 @@ sliplink_print(netdissect_options *ndo,
                 * Get it from the link layer since sl_uncompress_tcp()
                 * has restored the IP header copy to IPPROTO_TCP.
                 */
-               lastconn = ((const struct ip *)&p[SLX_CHDR])->ip_p;
+               lastconn = ((const struct ip *)(p + SLX_CHDR))->ip_p;
                ND_PRINT((ndo, "utcp %d: ", lastconn));
                if (dir == -1) {
                        /* Direction is bogus, don't use it */