File: gdb-memory_bstat.patch

package info (click to toggle)
gdb-msp430 7.2a~mspgcc-20111205-3.1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 18,996 kB
  • ctags: 5
  • sloc: makefile: 69
file content (31 lines) | stat: -rw-r--r-- 970 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 7f62f13c2b535c6a23035407f1c8a36ad7993dec Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey@redhat.com>
Date: Thu, 28 Apr 2011 20:36:49 +0000
Subject: [PATCH] 	* bfdio.c (memory_bstat): Pass correct size to memset.

---
 bfd/bfdio.c   |    4 ++--

diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index ce92781..dab8e88 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -1,7 +1,7 @@
 /* Low-level I/O routines for BFDs.
 
    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.
 
    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;
 
-  memset (statbuf, 0, sizeof (statbuf));
+  memset (statbuf, 0, sizeof (*statbuf));
   statbuf->st_size = bim->size;
 
   return 0;