Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 May 2018 05:10:06 +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-11@freebsd.org
Subject:   svn commit: r333356 - stable/11/usr.sbin/syslogd
Message-ID:  <201805080510.w485A61A069514@repo.freebsd.org>

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

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

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

Modified: stable/11/usr.sbin/syslogd/syslogd.c
==============================================================================
--- stable/11/usr.sbin/syslogd/syslogd.c	Tue May  8 04:54:36 2018	(r333355)
+++ stable/11/usr.sbin/syslogd/syslogd.c	Tue May  8 05:10:06 2018	(r333356)
@@ -675,7 +675,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");
 
@@ -686,7 +686,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?201805080510.w485A61A069514>