Source-Changes-HG archive

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

[src/trunk]: src/sys Correct obviously switched args to memset()



details:   https://anonhg.NetBSD.org/src/rev/05229f549c57
branches:  trunk
changeset: 534138:05229f549c57
user:      mjl <mjl%NetBSD.org@localhost>
date:      Thu Jul 18 02:07:13 2002 +0000

description:
Correct obviously switched args to memset()

diffstat:

 sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c |  4 ++--
 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c   |  4 ++--
 sys/arch/sh3/sh3/clock.c                         |  4 ++--
 sys/dev/pci/if_bge.c                             |  4 ++--
 4 files changed, 8 insertions(+), 8 deletions(-)

diffs (72 lines):

diff -r 0ec1c65a37b6 -r 05229f549c57 sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c
--- a/sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c  Wed Jul 17 23:35:12 2002 +0000
+++ b/sys/arch/amiga/stand/bootblock/aout2bb/aout2bb.c  Thu Jul 18 02:07:13 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aout2bb.c,v 1.6 2002/01/26 13:17:12 aymeric Exp $      */
+/*     $NetBSD: aout2bb.c,v 1.7 2002/07/18 02:13:12 mjl Exp $  */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -181,7 +181,7 @@
        if (tsz+dsz+bsz > bbsize)
                errx(1, "%s: resulting image too big\n", argv[0]);
 
-       memset(buffer, sizeof(buffer), 0);
+       memset(buffer, 0, sizeof(buffer));
        memcpy(buffer, image + N_TXTOFF(*eh), tsz+dsz);
 
        /*
diff -r 0ec1c65a37b6 -r 05229f549c57 sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c
--- a/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Wed Jul 17 23:35:12 2002 +0000
+++ b/sys/arch/amiga/stand/bootblock/elf2bb/elf2bb.c    Thu Jul 18 02:07:13 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: elf2bb.c,v 1.3 2002/03/26 05:18:19 mhitch Exp $        */
+/*     $NetBSD: elf2bb.c,v 1.4 2002/07/18 02:13:13 mjl Exp $   */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -212,7 +212,7 @@
        if (tsz+dsz+bsz > bbsize)
                errx(1, "%s: resulting image too big\n", argv[0]);
 
-       memset(buffer, bbsize, 0);
+       memset(buffer, 0, bbsize);
 
        /* Allocate and load loadable sections */
        sect_offset = (u_int32_t *)malloc(htobe16(eh->e_shnum) * sizeof(u_int32_t));
diff -r 0ec1c65a37b6 -r 05229f549c57 sys/arch/sh3/sh3/clock.c
--- a/sys/arch/sh3/sh3/clock.c  Wed Jul 17 23:35:12 2002 +0000
+++ b/sys/arch/sh3/sh3/clock.c  Thu Jul 18 02:07:13 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.25 2002/04/28 17:10:38 uch Exp $   */
+/*     $NetBSD: clock.c,v 1.26 2002/07/18 02:10:43 mjl Exp $   */
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -447,7 +447,7 @@
 
        if (retry == 0) {
                printf("rtc_gettime: couldn't read RTC register.\n");
-               memset(dt, sizeof(*dt), 0);
+               memset(dt, 0, sizeof(*dt));
                return;
        }
 
diff -r 0ec1c65a37b6 -r 05229f549c57 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Wed Jul 17 23:35:12 2002 +0000
+++ b/sys/dev/pci/if_bge.c      Thu Jul 18 02:07:13 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_bge.c,v 1.18 2002/07/13 22:48:40 thorpej Exp $      */
+/*     $NetBSD: if_bge.c,v 1.19 2002/07/18 02:07:13 mjl Exp $  */
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -1841,7 +1841,7 @@
        DPRINTFN(5, ("bzero\n"));
        sc->bge_rdata = (struct bge_ring_data *)kva;
 
-       memset(sc->bge_rdata, sizeof(struct bge_ring_data), 0);
+       memset(sc->bge_rdata, 0, sizeof(struct bge_ring_data));
 
        /* Try to allocate memory for jumbo buffers. */
        if (bge_alloc_jumbo_mem(sc)) {



Home | Main Index | Thread Index | Old Index