From: bluhm Date: Thu, 28 Jul 2016 13:05:52 +0000 (+0000) Subject: Use long labs(3) for pointer arithmetic. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=79e607562b1696c284306e5c8c35334a9ad9ef96;p=openbsd Use long labs(3) for pointer arithmetic. Found by David Hill with clang. --- diff --git a/usr.sbin/tcpdump/print-icmp6.c b/usr.sbin/tcpdump/print-icmp6.c index 4e8caed0294..5823fd4c11b 100644 --- a/usr.sbin/tcpdump/print-icmp6.c +++ b/usr.sbin/tcpdump/print-icmp6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-icmp6.c,v 1.20 2016/05/07 19:36:45 jca Exp $ */ +/* $OpenBSD: print-icmp6.c,v 1.21 2016/07/28 13:05:52 bluhm Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1991, 1993, 1994 @@ -452,7 +452,7 @@ icmp6_print(const u_char *bp, u_int length, const u_char *bp2) mode = FQDN; } } - if (mode == UNKNOWN && 2 < abs(buf[12] - (ep - buf - 13))) + if (mode == UNKNOWN && 2 < labs(buf[12] - (ep - buf - 13))) mode = WRU; if (mode == UNKNOWN) mode = FQDN;