Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/next68k/next68k fix memset bugs



details:   https://anonhg.NetBSD.org/src/rev/a8022705bdef
branches:  trunk
changeset: 328046:a8022705bdef
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Mar 24 19:57:47 2014 +0000

description:
fix memset bugs

diffstat:

 sys/arch/next68k/next68k/disksubr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 4eff55dd0c4c -r a8022705bdef sys/arch/next68k/next68k/disksubr.c
--- a/sys/arch/next68k/next68k/disksubr.c       Mon Mar 24 19:54:28 2014 +0000
+++ b/sys/arch/next68k/next68k/disksubr.c       Mon Mar 24 19:57:47 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disksubr.c,v 1.25 2009/03/16 23:11:13 dsl Exp $        */
+/*     $NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $   */
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.25 2009/03/16 23:11:13 dsl Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.26 2014/03/24 19:57:47 christos Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -171,7 +171,7 @@
        unsigned short *checksum;
 
 
-       memset (ondisk, 0, sizeof (ondisk));
+       memset (ondisk, 0, sizeof (*ondisk));
 
        ondisk->cd_version = NEXT68K_LABEL_CD_V3;
        /* ondisk->cd_label_blkno = 0; */
@@ -272,7 +272,7 @@
                                p->cp_minfree = 5; /* set some default */
                        p->cp_cpg = lp->d_partitions[nbp].p_cpg;
                } else {
-                       memset (p, 0, sizeof(p));
+                       memset (p, 0, sizeof(*p);
                        p->cp_size = -1;
                        p->cp_offset = -1;
                        p->cp_bsize = -1;



Home | Main Index | Thread Index | Old Index