diff options
| author | mjl <mjl@NetBSD.org> | 2002-07-20 16:51:43 +0000 |
|---|---|---|
| committer | mjl <mjl@NetBSD.org> | 2002-07-20 16:51:43 +0000 |
| commit | 7fc6ed7c11d42013eebfcdf2b2ff910bbd168708 (patch) | |
| tree | dedfc5c3563390f2b76c937aaeeadeed28bcdba2 /gnu | |
| parent | 856bd17f6605e7b0bfbca5e644e7e24d5d5db114 (diff) | |
Correct obviously wrong memset() args. OK'd by itojun.
Diffstat (limited to 'gnu')
| -rw-r--r-- | gnu/dist/gas/config/tc-z8k.c | 2 | ||||
| -rw-r--r-- | gnu/dist/toolchain/gdb/ser-pipe.c | 2 | ||||
| -rw-r--r-- | gnu/dist/toolchain/gdb/ser-tcp.c | 2 | ||||
| -rw-r--r-- | gnu/dist/toolchain/gdb/ser-unix.c | 2 | ||||
| -rw-r--r-- | gnu/dist/toolchain/sim/ppc/hw_nvram.c | 2 | ||||
| -rw-r--r-- | gnu/usr.bin/gas/subsegs.c | 6 |
6 files changed, 8 insertions, 8 deletions
diff --git a/gnu/dist/gas/config/tc-z8k.c b/gnu/dist/gas/config/tc-z8k.c index 909dd925343..82baefa6d1c 100644 --- a/gnu/dist/gas/config/tc-z8k.c +++ b/gnu/dist/gas/config/tc-z8k.c @@ -1027,7 +1027,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; top:; diff --git a/gnu/dist/toolchain/gdb/ser-pipe.c b/gnu/dist/toolchain/gdb/ser-pipe.c index a510bff8da3..c2b768b98c5 100644 --- a/gnu/dist/toolchain/gdb/ser-pipe.c +++ b/gnu/dist/toolchain/gdb/ser-pipe.c @@ -133,7 +133,7 @@ void _initialize_ser_pipe (void) { struct serial_ops *ops = XMALLOC (struct serial_ops); - memset (ops, sizeof (struct serial_ops), 0); + memset (ops, 0, sizeof (struct serial_ops)); ops->name = "pipe"; ops->next = 0; ops->open = pipe_open; diff --git a/gnu/dist/toolchain/gdb/ser-tcp.c b/gnu/dist/toolchain/gdb/ser-tcp.c index 86baf349108..e1e8dc99780 100644 --- a/gnu/dist/toolchain/gdb/ser-tcp.c +++ b/gnu/dist/toolchain/gdb/ser-tcp.c @@ -136,7 +136,7 @@ void _initialize_ser_tcp (void) { struct serial_ops *ops = XMALLOC (struct serial_ops); - memset (ops, sizeof (struct serial_ops), 0); + memset (ops, 0, sizeof (struct serial_ops)); ops->name = "tcp"; ops->next = 0; ops->open = tcp_open; diff --git a/gnu/dist/toolchain/gdb/ser-unix.c b/gnu/dist/toolchain/gdb/ser-unix.c index 47b6647311c..f4b67ac96bf 100644 --- a/gnu/dist/toolchain/gdb/ser-unix.c +++ b/gnu/dist/toolchain/gdb/ser-unix.c @@ -1284,7 +1284,7 @@ void _initialize_ser_hardwire (void) { struct serial_ops *ops = XMALLOC (struct serial_ops); - memset (ops, sizeof (struct serial_ops), 0); + memset (ops, 0, sizeof (struct serial_ops)); ops->name = "hardwire"; ops->next = 0; ops->open = hardwire_open; diff --git a/gnu/dist/toolchain/sim/ppc/hw_nvram.c b/gnu/dist/toolchain/sim/ppc/hw_nvram.c index 4c87d05d9be..32308f754a0 100644 --- a/gnu/dist/toolchain/sim/ppc/hw_nvram.c +++ b/gnu/dist/toolchain/sim/ppc/hw_nvram.c @@ -140,7 +140,7 @@ hw_nvram_init_address(device *me) nvram->memory = zalloc(nvram->sizeof_memory); } else - memset(nvram->memory, nvram->sizeof_memory, 0); + memset(nvram->memory, 0, nvram->sizeof_memory); if (device_find_property(me, "timezone") == NULL) nvram->timezone = 0; diff --git a/gnu/usr.bin/gas/subsegs.c b/gnu/usr.bin/gas/subsegs.c index 7bc8ad2d33e..c25f4eaeb94 100644 --- a/gnu/usr.bin/gas/subsegs.c +++ b/gnu/usr.bin/gas/subsegs.c @@ -22,7 +22,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: subsegs.c,v 1.4 1995/03/21 15:27:12 mycroft Exp $"; +static char rcsid[] = "$Id: subsegs.c,v 1.5 2002/07/20 16:51:44 mjl Exp $"; #endif #include "as.h" @@ -97,7 +97,7 @@ void /* It won't be used=> is ok if obstack... */ /* pads the end of it for alignment. */ frag_now=(fragS *)obstack_alloc(&frags,SIZEOF_STRUCT_FRAG); - memset(frag_now, SIZEOF_STRUCT_FRAG, 0); + memset(frag_now, 0, SIZEOF_STRUCT_FRAG); /* This 1st frag will not be in any frchain. */ /* We simply give subseg_new somewhere to scribble. */ now_subseg = 42; /* Lie for 1st call to subseg_new. */ @@ -254,7 +254,7 @@ register subsegT subseg; * This should be the only code that creates a frchainS. */ newP=(frchainS *)obstack_alloc(&frags,sizeof(frchainS)); - memset(newP, sizeof(frchainS), 0); + memset(newP, 0, sizeof(frchainS)); /* This begines on a good boundary */ /* because a obstack_done() preceeded it. */ /* It implies an obstack_done(), so we */ |
