summaryrefslogtreecommitdiff
path: root/moduli.c
diff options
context:
space:
mode:
authorderaadt@openbsd.org <deraadt@openbsd.org>2016-09-12 01:22:38 +0000
committerDarren Tucker <dtucker@zip.com.au>2016-09-12 13:46:29 +1000
commit9136ec134c97a8aff2917760c03134f52945ff3c (patch)
treebfcab357e6e0f510d9b63bac43b18097e89fa58a /moduli.c
parentf219fc8f03caca7ac82a38ed74bbd6432a1195e7 (diff)
upstream commit
Add MAXIMUM(), MINIMUM(), and ROUNDUP() to misc.h, then use those definitions rather than pulling <sys/param.h> and unknown namespace pollution. ok djm markus dtucker Upstream-ID: 712cafa816c9f012a61628b66b9fbd5687223fb8
Diffstat (limited to 'moduli.c')
-rw-r--r--moduli.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/moduli.c b/moduli.c
index ed1bdc946..e983b07b7 100644
--- a/moduli.c
+++ b/moduli.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: moduli.c,v 1.30 2015/01/20 23:14:00 deraadt Exp $ */ 1/* $OpenBSD: moduli.c,v 1.31 2016/09/12 01:22:38 deraadt Exp $ */
2/* 2/*
3 * Copyright 1994 Phil Karn <karn@qualcomm.com> 3 * Copyright 1994 Phil Karn <karn@qualcomm.com>
4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com> 4 * Copyright 1996-1998, 2003 William Allen Simpson <wsimpson@greendragon.com>
@@ -41,7 +41,6 @@
41 41
42#ifdef WITH_OPENSSL 42#ifdef WITH_OPENSSL
43 43
44#include <sys/param.h> /* MAX */
45#include <sys/types.h> 44#include <sys/types.h>
46 45
47#include <openssl/bn.h> 46#include <openssl/bn.h>
@@ -609,7 +608,7 @@ prime_test(FILE *in, FILE *out, u_int32_t trials, u_int32_t generator_wanted,
609 608
610 if (checkpoint_file != NULL) 609 if (checkpoint_file != NULL)
611 last_processed = read_checkpoint(checkpoint_file); 610 last_processed = read_checkpoint(checkpoint_file);
612 last_processed = start_lineno = MAX(last_processed, start_lineno); 611 last_processed = start_lineno = MAXIMUM(last_processed, start_lineno);
613 if (end_lineno == ULONG_MAX) 612 if (end_lineno == ULONG_MAX)
614 debug("process from line %lu from pipe", last_processed); 613 debug("process from line %lu from pipe", last_processed);
615 else 614 else