From: George Thessalonikefs Date: Wed, 2 Aug 2023 13:51:05 +0000 (+0200) Subject: - For #762: remove relocated code. X-Git-Tag: release-1.18.0rc1~14^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6e47c1e05bce983077085fc2047c6479185a0ed2;p=thirdparty%2Funbound.git - For #762: remove relocated code. --- diff --git a/util/data/msgparse.c b/util/data/msgparse.c index 1a7754c3d..33002ddca 100644 --- a/util/data/msgparse.c +++ b/util/data/msgparse.c @@ -942,44 +942,6 @@ parse_packet(sldns_buffer* pkt, struct msg_parse* msg, struct regional* region) return 0; } -///** RFC 1982 comparison, uses unsigned integers, and tries to avoid -// * compiler optimization (eg. by avoiding a-b<0 comparisons), -// * this routine matches compare_serial(), for SOA serial number checks */ -//static int -//compare_1982(uint32_t a, uint32_t b) -//{ -// /* for 32 bit values */ -// const uint32_t cutoff = ((uint32_t) 1 << (32 - 1)); -// -// if (a == b) { -// return 0; -// } else if ((a < b && b - a < cutoff) || (a > b && a - b > cutoff)) { -// return -1; -// } else { -// return 1; -// } -//} -// -///** if we know that b is larger than a, return the difference between them, -// * that is the distance between them. in RFC1982 arith */ -//static uint32_t -//subtract_1982(uint32_t a, uint32_t b) -//{ -// /* for 32 bit values */ -// const uint32_t cutoff = ((uint32_t) 1 << (32 - 1)); -// -// if(a == b) -// return 0; -// if(a < b && b - a < cutoff) { -// return b-a; -// } -// if(a > b && a - b > cutoff) { -// return ((uint32_t)0xffffffff) - (a-b-1); -// } -// /* wrong case, b smaller than a */ -// return 0; -//} - static uint8_t * cookie_hash(uint8_t *hash, uint8_t *buf, diff --git a/validator/val_sigcrypt.c b/validator/val_sigcrypt.c index 8f05591e5..215f9ad85 100644 --- a/validator/val_sigcrypt.c +++ b/validator/val_sigcrypt.c @@ -1379,44 +1379,6 @@ sigdate_error(const char* str, int32_t expi, int32_t incep, int32_t now) (unsigned)incep, (unsigned)now); } -///** RFC 1982 comparison, uses unsigned integers, and tries to avoid -// * compiler optimization (eg. by avoiding a-b<0 comparisons), -// * this routine matches compare_serial(), for SOA serial number checks */ -//static int -//compare_1982(uint32_t a, uint32_t b) -//{ -// /* for 32 bit values */ -// const uint32_t cutoff = ((uint32_t) 1 << (32 - 1)); -// -// if (a == b) { -// return 0; -// } else if ((a < b && b - a < cutoff) || (a > b && a - b > cutoff)) { -// return -1; -// } else { -// return 1; -// } -//} -// -///** if we know that b is larger than a, return the difference between them, -// * that is the distance between them. in RFC1982 arith */ -//static uint32_t -//subtract_1982(uint32_t a, uint32_t b) -//{ -// /* for 32 bit values */ -// const uint32_t cutoff = ((uint32_t) 1 << (32 - 1)); -// -// if(a == b) -// return 0; -// if(a < b && b - a < cutoff) { -// return b-a; -// } -// if(a > b && a - b > cutoff) { -// return ((uint32_t)0xffffffff) - (a-b-1); -// } -// /* wrong case, b smaller than a */ -// return 0; -//} - /** check rrsig dates */ static int check_dates(struct val_env* ve, uint32_t unow, uint8_t* expi_p,