From: Shawn Routhier Date: Thu, 16 Apr 2015 19:24:44 +0000 (-0700) Subject: [v4_1_esv] Keep some compilers happy by using labs() instead of abs() X-Git-Tag: v4_1_esv_r12b1~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bbf73e6b65245cba6f9139d82a53262d1ec1e850;p=thirdparty%2Fdhcp.git [v4_1_esv] Keep some compilers happy by using labs() instead of abs() --- diff --git a/RELNOTES b/RELNOTES index ab5dda020..d1fb9e57a 100644 --- 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 diff --git a/minires/ns_verify.c b/minires/ns_verify.c index c085058cb..4f09ccae4 100644 --- a/minires/ns_verify.c +++ b/minires/ns_verify.c @@ -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;