summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authoraraujo <araujo@FreeBSD.org>2016-04-21 06:21:33 +0000
committeraraujo <araujo@FreeBSD.org>2016-04-21 06:21:33 +0000
commit0726a6056d459e0ad42fcc14454549e731a58c78 (patch)
treedd8c817e415990e211084d241dcf9c7e1ca20c90 /sbin/hastd
parent9a4fb399f8d7d0c74395792ab4efaa266ce8839b (diff)
downloadFreeBSD-src-0726a6056d459e0ad42fcc14454549e731a58c78.zip
FreeBSD-src-0726a6056d459e0ad42fcc14454549e731a58c78.tar.gz
Use MAX() from sys/param.h.
MFC after: 2 weeks.
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/hastd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c
index bac390a..3d42f5d 100644
--- a/sbin/hastd/hastd.c
+++ b/sbin/hastd/hastd.c
@@ -1090,7 +1090,7 @@ main_loop(void)
fd = proto_descriptor(lst->hl_conn);
PJDLOG_ASSERT(fd >= 0);
FD_SET(fd, &rfds);
- maxfd = fd > maxfd ? fd : maxfd;
+ maxfd = MAX(fd, maxfd);
}
TAILQ_FOREACH(res, &cfg->hc_resources, hr_next) {
if (res->hr_event == NULL)
@@ -1098,14 +1098,14 @@ main_loop(void)
fd = proto_descriptor(res->hr_event);
PJDLOG_ASSERT(fd >= 0);
FD_SET(fd, &rfds);
- maxfd = fd > maxfd ? fd : maxfd;
+ maxfd = MAX(fd, maxfd);
if (res->hr_role == HAST_ROLE_PRIMARY) {
/* Only primary workers asks for connections. */
PJDLOG_ASSERT(res->hr_conn != NULL);
fd = proto_descriptor(res->hr_conn);
PJDLOG_ASSERT(fd >= 0);
FD_SET(fd, &rfds);
- maxfd = fd > maxfd ? fd : maxfd;
+ maxfd = MAX(fd, maxfd);
} else {
PJDLOG_ASSERT(res->hr_conn == NULL);
}
OpenPOWER on IntegriCloud