svn commit: r256217 - in stable/9/sys: cam/ctl net netpfil/ipfw

Alexander Motin mav at FreeBSD.org
Wed Oct 9 19:03:00 UTC 2013


Author: mav
Date: Wed Oct  9 19:02:59 2013
New Revision: 256217
URL: http://svnweb.freebsd.org/changeset/base/256217

Log:
  MFC r250131 (by eadler):
  Correct a few sizeof()s

Modified:
  stable/9/sys/cam/ctl/ctl_frontend_internal.c
  stable/9/sys/net/if_spppsubr.c
  stable/9/sys/netpfil/ipfw/ip_dummynet.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/net/   (props changed)

Modified: stable/9/sys/cam/ctl/ctl_frontend_internal.c
==============================================================================
--- stable/9/sys/cam/ctl/ctl_frontend_internal.c	Wed Oct  9 18:58:28 2013	(r256216)
+++ stable/9/sys/cam/ctl/ctl_frontend_internal.c	Wed Oct  9 19:02:59 2013	(r256217)
@@ -253,7 +253,7 @@ cfi_init(void)
 		       sizeof(struct cfi_lun_io),
 		       CTL_PORT_PRIV_SIZE);
 	}
-	memset(softc, 0, sizeof(softc));
+	memset(softc, 0, sizeof(*softc));
 
 	mtx_init(&softc->lock, "CTL frontend mutex", NULL, MTX_DEF);
 	softc->flags |= CTL_FLAG_MASTER_SHELF;

Modified: stable/9/sys/net/if_spppsubr.c
==============================================================================
--- stable/9/sys/net/if_spppsubr.c	Wed Oct  9 18:58:28 2013	(r256216)
+++ stable/9/sys/net/if_spppsubr.c	Wed Oct  9 19:02:59 2013	(r256217)
@@ -3619,7 +3619,7 @@ sppp_ipv6cp_RCR(struct sppp *sp, struct 
 				continue;
 			}
 
-			bzero(&suggestaddr, sizeof(&suggestaddr));
+			bzero(&suggestaddr, sizeof(suggestaddr));
 			if (collision && nohisaddr) {
 				/* collision, hisaddr unknown - Conf-Rej */
 				type = CONF_REJ;

Modified: stable/9/sys/netpfil/ipfw/ip_dummynet.c
==============================================================================
--- stable/9/sys/netpfil/ipfw/ip_dummynet.c	Wed Oct  9 18:58:28 2013	(r256216)
+++ stable/9/sys/netpfil/ipfw/ip_dummynet.c	Wed Oct  9 19:02:59 2013	(r256217)
@@ -617,7 +617,7 @@ fsk_detach(struct dn_fsk *fs, int flags)
 		fs->sched->fp->free_fsk(fs);
 	fs->sched = NULL;
 	if (flags & DN_DELETE_FS) {
-		bzero(fs, sizeof(fs));	/* safety */
+		bzero(fs, sizeof(*fs));	/* safety */
 		free(fs, M_DUMMYNET);
 		dn_cfg.fsk_count--;
 	} else {


More information about the svn-src-stable-9 mailing list