Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2018 05:11:07 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r333357 - stable/10/usr.sbin/syslogd
Message-ID:  <201805080511.w485B7uM070407@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue May  8 05:11:06 2018
New Revision: 333357
URL: https://svnweb.freebsd.org/changeset/base/333357

Log:
  MFC r332877: Correct size for allocation and bzero of fdsr.
  
  Approved by:	re (gjb)

Modified:
  stable/10/usr.sbin/syslogd/syslogd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/usr.sbin/syslogd/syslogd.c
==============================================================================
--- stable/10/usr.sbin/syslogd/syslogd.c	Tue May  8 05:10:06 2018	(r333356)
+++ stable/10/usr.sbin/syslogd/syslogd.c	Tue May  8 05:11:06 2018	(r333357)
@@ -643,7 +643,7 @@ main(int argc, char *argv[])
 			fdsrmax = fx->s;
 
 	fdsr = (fd_set *)calloc(howmany(fdsrmax+1, NFDBITS),
-	    sizeof(fd_mask));
+	    sizeof(*fdsr));
 	if (fdsr == NULL)
 		errx(1, "calloc fd_set");
 
@@ -654,7 +654,7 @@ main(int argc, char *argv[])
 			die(WantDie);
 
 		bzero(fdsr, howmany(fdsrmax+1, NFDBITS) *
-		    sizeof(fd_mask));
+		    sizeof(*fdsr));
 
 		if (fklog != -1)
 			FD_SET(fklog, fdsr);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201805080511.w485B7uM070407>