From b0da5903b03e65d1540ede2554cc4feff69140b6 Mon Sep 17 00:00:00 2001 From: "Federico G. Schwindt" Date: Tue, 16 Jul 2002 13:40:30 +0000 Subject: Correct memset arguments; from Moritz Jodeit via PR/2822. Submited to binutils as well. --- gnu/usr.bin/binutils/bfd/peXXigen.c | 2 +- gnu/usr.bin/binutils/bfd/peigen.c | 2 +- gnu/usr.bin/binutils/gas/config/tc-z8k.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/usr.bin/binutils') diff --git a/gnu/usr.bin/binutils/bfd/peXXigen.c b/gnu/usr.bin/binutils/bfd/peXXigen.c index 0e1eaeac536..f62d9cb9cc2 100644 --- a/gnu/usr.bin/binutils/bfd/peXXigen.c +++ b/gnu/usr.bin/binutils/bfd/peXXigen.c @@ -639,7 +639,7 @@ _bfd_XXi_swap_aouthdr_out (abfd, in, out) extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; /* first null out all data directory entries .. */ - memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0); + memset (extra->DataDirectory, 0, sizeof (extra->DataDirectory)); add_data_entry (abfd, extra, 0, ".edata", ib); diff --git a/gnu/usr.bin/binutils/bfd/peigen.c b/gnu/usr.bin/binutils/bfd/peigen.c index 8e40bd3cd61..a6fd7f600cf 100644 --- a/gnu/usr.bin/binutils/bfd/peigen.c +++ b/gnu/usr.bin/binutils/bfd/peigen.c @@ -564,7 +564,7 @@ _bfd_pei_swap_aouthdr_out (abfd, in, out) extra->NumberOfRvaAndSizes = IMAGE_NUMBEROF_DIRECTORY_ENTRIES; /* first null out all data directory entries .. */ - memset (extra->DataDirectory, sizeof (extra->DataDirectory), 0); + memset (extra->DataDirectory, 0, sizeof (extra->DataDirectory)); add_data_entry (abfd, extra, 0, ".edata", ib); diff --git a/gnu/usr.bin/binutils/gas/config/tc-z8k.c b/gnu/usr.bin/binutils/gas/config/tc-z8k.c index 73666ca89ab..50aaa89ead8 100644 --- a/gnu/usr.bin/binutils/gas/config/tc-z8k.c +++ b/gnu/usr.bin/binutils/gas/config/tc-z8k.c @@ -996,7 +996,7 @@ build_bytes (this_try, operand) frag_wane (frag_now); frag_new (0); - memset (buffer, 20, 0); + memset (buffer, 0, 20); class_ptr = this_try->byte_info; for (nibble = 0; (c = *class_ptr++); nibble++) -- cgit v1.2.3