Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/amiga/stand/bootblock/elf2bb Do not cast return val...



details:   https://anonhg.NetBSD.org/src/rev/7bac21c73d5f
branches:  trunk
changeset: 365797:7bac21c73d5f
user:      rin <rin%NetBSD.org@localhost>
date:      Mon Apr 25 14:36:47 2022 +0000

description:
Do not cast return value from malloc(3).

No binary changes.

diffstat:

 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r a44f95d4936b -r 7bac21c73d5f sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
--- a/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Mon Apr 25 14:10:15 2022 +0000
+++ b/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Mon Apr 25 14:36:47 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf2bb.c,v 1.24 2022/04/25 14:10:15 rin Exp $  */
+/*     $NetBSD: elf2bb.c,v 1.25 2022/04/25 14:36:47 rin Exp $  */
 
 /*-
  * Copyright (c) 1996,2006 The NetBSD Foundation, Inc.
@@ -243,7 +243,7 @@
        memset(buffer, 0, bbsize);
 
        /* Allocate and load loadable sections */
-       sect_offset = (uint32_t *)malloc(be16toh(eh->e_shnum) * sizeof(uint32_t));
+       sect_offset = malloc(be16toh(eh->e_shnum) * sizeof(uint32_t));
        for (i = 0, l = 0; i < be16toh(eh->e_shnum); ++i) {
                if (be32toh(sh[i].sh_flags) & SHF_ALLOC) {
                        dprintf(("vaddr 0x%04x size 0x%04x offset 0x%04x section %s\n",



Home | Main Index | Thread Index | Old Index