I think we can assume that people have abs(3) these days...

This macro only had one usage, which is visible in the diff. It doesn't
look like replacing it should cause any functional changes to the
arithmetic.

ok?


Index: print-icmp6.c
===================================================================
RCS file: /cvs/src/usr.sbin/tcpdump/print-icmp6.c,v
retrieving revision 1.17
diff -u -p -r1.17 print-icmp6.c
--- print-icmp6.c       16 Nov 2015 00:16:39 -0000      1.17
+++ print-icmp6.c       9 Mar 2016 08:05:24 -0000
@@ -43,6 +43,7 @@
 #include <arpa/inet.h>
 
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include <netinet/ip6.h>
@@ -435,9 +436,6 @@ icmp6_print(const u_char *bp, u_int leng
                                        mode = FQDN;
                        }
                }
-#ifndef abs
-#define abs(a) ((0 < (a)) ? (a) : -(a))
-#endif
                if (mode == UNKNOWN && 2 < abs(buf[12] - (ep - buf - 13)))
                        mode = WRU;
                if (mode == UNKNOWN)

Reply via email to