mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 21:31:05 +01:00
Use MAX() from sys/param.h.
MFC after: 2 weeks.
This commit is contained in:
parent
8a9508c046
commit
67210fb3b8
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=298393
@ -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