Author: delphij
Date: Mon Apr 23 07:15:49 2018
New Revision: 332877
URL: https://svnweb.freebsd.org/changeset/base/332877
Log:
Correct size for allocation and bzero of fdsr.
MFC after: 2 weeks
Modified:
head/usr.sbin/syslogd/syslogd.c
Modified: head/usr.sbin/syslogd/syslogd.c
==============================================================================
--- head/usr.sbin/syslogd/syslogd.c Sun Apr 22 23:51:24 2018
(r332876)
+++ head/usr.sbin/syslogd/syslogd.c Mon Apr 23 07:15:49 2018
(r332877)
@@ -744,7 +744,7 @@ main(int argc, char *argv[])
fdsrmax = sl->sl_socket;
}
fdsr = (fd_set *)calloc(howmany(fdsrmax+1, NFDBITS),
- sizeof(fd_mask));
+ sizeof(*fdsr));
if (fdsr == NULL)
errx(1, "calloc fd_set");
@@ -763,7 +763,7 @@ main(int argc, char *argv[])
}
bzero(fdsr, howmany(fdsrmax+1, NFDBITS) *
- sizeof(fd_mask));
+ sizeof(*fdsr));
STAILQ_FOREACH(sl, &shead, next) {
if (sl->sl_socket != -1 && sl->sl_recv != NULL)
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"