Module Name: src
Committed By: kamil
Date: Sun Aug 18 16:49:30 UTC 2019
Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c
Log Message:
Correct the memset(3)'s third argument in i386 biosdisk.c
The size of allocation is the size of the structure biosdisk, not the size
of a pointer.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/i386/stand/lib/biosdisk.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.50 src/sys/arch/i386/stand/lib/biosdisk.c:1.51
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.50 Sun Aug 18 02:18:25 2019
+++ src/sys/arch/i386/stand/lib/biosdisk.c Sun Aug 18 16:49:30 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: biosdisk.c,v 1.50 2019/08/18 02:18:25 manu Exp $ */
+/* $NetBSD: biosdisk.c,v 1.51 2019/08/18 16:49:30 kamil Exp $ */
/*
* Copyright (c) 1996, 1998
@@ -858,7 +858,7 @@ biosdisk_probe(void)
printf("Out of memory\n");
return;
}
- memset(d, 0, sizeof(d));
+ memset(d, 0, sizeof(*d));
memset(&ed, 0, sizeof(ed));
if (i >= MAX_BIOSDISKS)
d->ll.dev = 0x00 + i - MAX_BIOSDISKS; /* fd */