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 Let the compiler determine the corre...



details:   https://anonhg.NetBSD.org/src/rev/8c46246cf44a
branches:  trunk
changeset: 760479:8c46246cf44a
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Wed Jan 05 21:44:23 2011 +0000

description:
Let the compiler determine the correct type for sizeof().
>From Mike Volokhov's GPT booting GSoC.

diffstat:

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

diffs (27 lines):

diff -r d622e33dff64 -r 8c46246cf44a sys/arch/i386/stand/lib/biosdisk.c
--- a/sys/arch/i386/stand/lib/biosdisk.c        Wed Jan 05 21:20:44 2011 +0000
+++ b/sys/arch/i386/stand/lib/biosdisk.c        Wed Jan 05 21:44:23 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: biosdisk.c,v 1.34 2010/12/30 22:28:53 jakllsch Exp $   */
+/*     $NetBSD: biosdisk.c,v 1.35 2011/01/05 21:44:23 jakllsch Exp $   */
 
 /*
  * Copyright (c) 1996, 1998
@@ -497,7 +497,7 @@
 out:
         va_end(ap);
        if (error)
-               dealloc(d, sizeof(struct biosdisk));
+               dealloc(d, sizeof(*d));
        return error;
 }
 
@@ -511,7 +511,7 @@
        if (d->ll.type == BIOSDISK_TYPE_FD)
                wait_sec(3);    /* 2s is enough on all PCs I found */
 
-       dealloc(d, sizeof(struct biosdisk));
+       dealloc(d, sizeof(*d));
        f->f_devdata = NULL;
        return 0;
 }



Home | Main Index | Thread Index | Old Index