diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-03-26 18:34:26 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2006-03-26 18:34:26 +0000 |
commit | cfec5c449db967caced49f24846875b2258d8e27 (patch) | |
tree | b4421b46fd40c0f33af0b7dcd3ec9dd25b0aca22 /gnu/usr.bin/binutils/gdb | |
parent | 8d27301b0cd3f9c29e200c989723da8898c81815 (diff) |
Fix memset(.., ..., 0) bugs that are already fixed upstream.
From Alexey Dobriyan.
Diffstat (limited to 'gnu/usr.bin/binutils/gdb')
-rw-r--r-- | gnu/usr.bin/binutils/gdb/remote.c | 2 | ||||
-rw-r--r-- | gnu/usr.bin/binutils/gdb/std-regs.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gnu/usr.bin/binutils/gdb/remote.c b/gnu/usr.bin/binutils/gdb/remote.c index 5d1ac7f2eb0..579f77ef6ed 100644 --- a/gnu/usr.bin/binutils/gdb/remote.c +++ b/gnu/usr.bin/binutils/gdb/remote.c @@ -3429,7 +3429,7 @@ remote_store_registers (int regnum) { int i; regs = alloca (rs->sizeof_g_packet); - memset (regs, rs->sizeof_g_packet, 0); + memset (regs, 0, rs->sizeof_g_packet); for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) { struct packet_reg *r = &rs->regs[i]; diff --git a/gnu/usr.bin/binutils/gdb/std-regs.c b/gnu/usr.bin/binutils/gdb/std-regs.c index 368720dd95b..bd134b515b3 100644 --- a/gnu/usr.bin/binutils/gdb/std-regs.c +++ b/gnu/usr.bin/binutils/gdb/std-regs.c @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame_info *frame) val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; buf = VALUE_CONTENTS_RAW (val); - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); /* frame.base. */ if (frame != NULL) ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame) struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_base_address (frame)); @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct frame_info *frame) struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_pc (frame)); |