summaryrefslogtreecommitdiff
path: root/ssh-agent.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 /ssh-agent.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 'ssh-agent.c')
-rw-r--r--ssh-agent.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ssh-agent.c b/ssh-agent.c
index 25d6ebc53..fd5f2b35d 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.213 2016/05/02 08:49:03 djm Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.214 2016/09/12 01:22:38 deraadt Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -36,7 +36,6 @@
36 36
37#include "includes.h" 37#include "includes.h"
38 38
39#include <sys/param.h> /* MIN MAX */
40#include <sys/types.h> 39#include <sys/types.h>
41#include <sys/param.h> 40#include <sys/param.h>
42#include <sys/resource.h> 41#include <sys/resource.h>
@@ -539,7 +538,7 @@ reaper(void)
539 tab->nentries--; 538 tab->nentries--;
540 } else 539 } else
541 deadline = (deadline == 0) ? id->death : 540 deadline = (deadline == 0) ? id->death :
542 MIN(deadline, id->death); 541 MINIMUM(deadline, id->death);
543 } 542 }
544 } 543 }
545 if (deadline == 0 || deadline <= now) 544 if (deadline == 0 || deadline <= now)
@@ -991,7 +990,7 @@ prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, u_int *nallocp,
991 switch (sockets[i].type) { 990 switch (sockets[i].type) {
992 case AUTH_SOCKET: 991 case AUTH_SOCKET:
993 case AUTH_CONNECTION: 992 case AUTH_CONNECTION:
994 n = MAX(n, sockets[i].fd); 993 n = MAXIMUM(n, sockets[i].fd);
995 break; 994 break;
996 case AUTH_UNUSED: 995 case AUTH_UNUSED:
997 break; 996 break;
@@ -1030,7 +1029,7 @@ prepare_select(fd_set **fdrp, fd_set **fdwp, int *fdl, u_int *nallocp,
1030 deadline = reaper(); 1029 deadline = reaper();
1031 if (parent_alive_interval != 0) 1030 if (parent_alive_interval != 0)
1032 deadline = (deadline == 0) ? parent_alive_interval : 1031 deadline = (deadline == 0) ? parent_alive_interval :
1033 MIN(deadline, parent_alive_interval); 1032 MINIMUM(deadline, parent_alive_interval);
1034 if (deadline == 0) { 1033 if (deadline == 0) {
1035 *tvpp = NULL; 1034 *tvpp = NULL;
1036 } else { 1035 } else {