Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386/stand/lib Correct the memset(3)'s third argume...



details:   https://anonhg.NetBSD.org/src/rev/9a439c47611f
branches:  trunk
changeset: 1002858:9a439c47611f
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Aug 18 16:49:30 2019 +0000

description:
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.

diffstat:

 sys/arch/i386/stand/lib/biosdisk.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 6a697f6b2383 -r 9a439c47611f sys/arch/i386/stand/lib/biosdisk.c
--- a/sys/arch/i386/stand/lib/biosdisk.c        Sun Aug 18 14:32:34 2019 +0000
+++ b/sys/arch/i386/stand/lib/biosdisk.c        Sun Aug 18 16:49:30 2019 +0000
@@ -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 @@
                        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 */



Home | Main Index | Thread Index | Old Index