* bfdio.c (memory_bstat): Pass correct size to memset.

This commit is contained in:
Tom Tromey 2011-04-28 20:36:50 +00:00
parent 165195f46b
commit b5dee4ead1
2 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
2011-04-28 Tom Tromey <tromey@redhat.com>
* bfdio.c (memory_bstat): Pass correct size to memset.
2011-04-28 Mike Frysinger <vapier@gentoo.org> 2011-04-28 Mike Frysinger <vapier@gentoo.org>
* dwarf2.c (dwarf_debug_sections): Mark const. * dwarf2.c (dwarf_debug_sections): Mark const.

View file

@ -1,7 +1,7 @@
/* Low-level I/O routines for BFDs. /* Low-level I/O routines for BFDs.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
Free Software Foundation, Inc. Free Software Foundation, Inc.
Written by Cygnus Support. Written by Cygnus Support.
@ -577,7 +577,7 @@ memory_bstat (bfd *abfd, struct stat *statbuf)
{ {
struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream; struct bfd_in_memory *bim = (struct bfd_in_memory *) abfd->iostream;
memset (statbuf, 0, sizeof (statbuf)); memset (statbuf, 0, sizeof (*statbuf));
statbuf->st_size = bim->size; statbuf->st_size = bim->size;
return 0; return 0;