Source-Changes-HG archive

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

[src/trunk]: src/sys/kern *NEVER* cast a reference parameter (unless you're u...



details:   https://anonhg.NetBSD.org/src/rev/2deb5954ca7f
branches:  trunk
changeset: 503299:2deb5954ca7f
user:      eeh <eeh%NetBSD.org@localhost>
date:      Sun Feb 04 19:12:09 2001 +0000

description:
*NEVER* cast a reference parameter (unless you're using C++).

diffstat:

 sys/kern/exec_elf32.c |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (22 lines):

diff -r a4d5c2fb11d5 -r 2deb5954ca7f sys/kern/exec_elf32.c
--- a/sys/kern/exec_elf32.c     Sun Feb 04 18:32:10 2001 +0000
+++ b/sys/kern/exec_elf32.c     Sun Feb 04 19:12:09 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: exec_elf32.c,v 1.61 2000/12/15 06:14:21 mycroft Exp $  */
+/*     $NetBSD: exec_elf32.c,v 1.62 2001/02/04 19:12:09 eeh Exp $      */
 
 /*-
  * Copyright (c) 1994, 2000 The NetBSD Foundation, Inc.
@@ -518,8 +518,11 @@
        if (!epp->ep_esch->u.elf_probe_func) {
                pos = ELFDEFNNAME(NO_ADDR);
        } else {
+               vaddr_t startp = 0;
+
                error = (*epp->ep_esch->u.elf_probe_func)(p, epp, eh, interp,
-                               (vaddr_t *)&pos);
+                                                         &startp);
+               pos = (Elf_Addr)startp;
                if (error)
                        goto bad;
        }



Home | Main Index | Thread Index | Old Index