]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
[v4_1_esv] Keep some compilers happy by using labs() instead of abs()
authorShawn Routhier <sar@isc.org>
Thu, 16 Apr 2015 19:24:44 +0000 (12:24 -0700)
committerShawn Routhier <sar@isc.org>
Thu, 16 Apr 2015 19:24:44 +0000 (12:24 -0700)
RELNOTES
minires/ns_verify.c

index ab5dda020739637e9b01385ab09001198a22d85c..d1fb9e57aa5a95eb982ff41cd371bf671a3c0e80 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -95,6 +95,10 @@ by Eric Young (eay@cryptsoft.com).
   table 3.
   [ISC-Bugs #38769]
 
+- Some compilers don't like the use of abs in minires/ns_verify.c,
+  change it to labs to make them happy.
+  [ISC-Bugs #39301]
+
                        Changes since 4.1-ESV-R11rc2
 
 - None
index c085058cb68ac20dd73342aec10f4bf1fa40a4bc..4f09ccae468ed98d5a8cd0558d454090d3503cdc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2014 by Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (c) 2013-2015 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 2004,2007,2009 by Internet Systems Consortium, Inc. ("ISC")
  * Copyright (c) 1999-2003 by Internet Software Consortium
  *
@@ -301,7 +301,7 @@ ns_verify(u_char *msg, unsigned *msglen, void *k,
        hp->arcount = htons(ntohs(hp->arcount) + 1);
 
        /* Verify the time. */
-       if (abs((*timesigned) - time(NULL)) > fudge)
+       if (labs((*timesigned) - time(NULL)) > fudge)
                return ISC_R_BADTIME;
 
        if (nostrip == 0) {
@@ -469,7 +469,7 @@ ns_verify_tcp(u_char *msg, unsigned *msglen, ns_tcp_tsig_state *state,
        state->siglen = sigfieldlen;
 
        /* Verify the time. */
-       if (abs(timesigned - time(NULL)) > fudge)
+       if (labs(timesigned - time(NULL)) > fudge)
                return ISC_R_BADTIME;
 
        *msglen = recstart - msg;