fix memset bugs
This commit is contained in:
parent
7bde9f2c98
commit
0e2084a15a
@ -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 @@ build_nextstep_label(struct next68k_disklabel *ondisk, struct disklabel *lp)
|
||||
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 @@ build_nextstep_label(struct next68k_disklabel *ondisk, struct disklabel *lp)
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user