summaryrefslogtreecommitdiff
path: root/crypto/openssh/krl.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssh/krl.c')
-rw-r--r--crypto/openssh/krl.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/crypto/openssh/krl.c b/crypto/openssh/krl.c
index fff1a3f7cbaf..e271a1934407 100644
--- a/crypto/openssh/krl.c
+++ b/crypto/openssh/krl.c
@@ -14,11 +14,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $OpenBSD: krl.c,v 1.37 2015/12/31 00:33:52 djm Exp $ */
+/* $OpenBSD: krl.c,v 1.38 2016/09/12 01:22:38 deraadt Exp $ */
#include "includes.h"
-#include <sys/param.h> /* MIN */
#include <sys/types.h>
#include <openbsd-compat/sys-tree.h>
#include <openbsd-compat/sys-queue.h>
@@ -121,7 +120,7 @@ blob_cmp(struct revoked_blob *a, struct revoked_blob *b)
int r;
if (a->len != b->len) {
- if ((r = memcmp(a->blob, b->blob, MIN(a->len, b->len))) != 0)
+ if ((r = memcmp(a->blob, b->blob, MINIMUM(a->len, b->len))) != 0)
return r;
return a->len > b->len ? 1 : -1;
} else
@@ -458,9 +457,9 @@ choose_next_state(int current_state, u_int64_t contig, int final,
* Avoid unsigned overflows.
* The limits are high enough to avoid confusing the calculations.
*/
- contig = MIN(contig, 1ULL<<31);
- last_gap = MIN(last_gap, 1ULL<<31);
- next_gap = MIN(next_gap, 1ULL<<31);
+ contig = MINIMUM(contig, 1ULL<<31);
+ last_gap = MINIMUM(last_gap, 1ULL<<31);
+ next_gap = MINIMUM(next_gap, 1ULL<<31);
/*
* Calculate the cost to switch from the current state to candidates.
@@ -486,8 +485,8 @@ choose_next_state(int current_state, u_int64_t contig, int final,
/* Estimate base cost in bits of each section type */
cost_list += 64 * contig + (final ? 0 : 8+64);
cost_range += (2 * 64) + (final ? 0 : 8+64);
- cost_bitmap += last_gap + contig + (final ? 0 : MIN(next_gap, 8+64));
- cost_bitmap_restart += contig + (final ? 0 : MIN(next_gap, 8+64));
+ cost_bitmap += last_gap + contig + (final ? 0 : MINIMUM(next_gap, 8+64));
+ cost_bitmap_restart += contig + (final ? 0 : MINIMUM(next_gap, 8+64));
/* Convert to byte costs for actual comparison */
cost_list = (cost_list + 7) / 8;