Author: araujo
Date: Thu Apr 21 06:21:33 2016
New Revision: 298393
URL: https://svnweb.freebsd.org/changeset/base/298393
Log:
Use MAX() from sys/param.h.
MFC after: 2 weeks.
Modified:
head/sbin/hastd/hastd.c
Modified: head/sbin/hastd/hastd.c
==============================================================================
--- head/sbin/hastd/hastd.c Thu Apr 21 06:19:33 2016 (r298392)
+++ head/sbin/hastd/hastd.c Thu Apr 21 06:21:33 2016 (r298393)
@@ -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);
}
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"