Use MAX() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
8a9508c046
commit
67210fb3b8
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user