aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorAndreas Arnez <arnez@linux.vnet.ibm.com>2017-05-04 11:06:10 +0200
committerAndreas Arnez <arnez@linux.vnet.ibm.com>2017-05-04 11:06:10 +0200
commit45eba0ab7d26435121facb68847fbd0cd4a313c1 (patch)
tree7c8e7e24d11b049284b18fbac4519c4eb1699683 /gdb
parentb660e9eb7a45cfe99e719c5d16af35913a2fdc96 (diff)
downloadgdb-45eba0ab7d26435121facb68847fbd0cd4a313c1.zip
gdb-45eba0ab7d26435121facb68847fbd0cd4a313c1.tar.gz
gdb-45eba0ab7d26435121facb68847fbd0cd4a313c1.tar.bz2
Remove some superfluous code in corelow.c
In corelow.c I stumbled upon an extra semicolon and an xfree of a NULL pointer. Remove them. gdb/ChangeLog: * corelow.c (sniff_core_bfd): Remove extra semicolon. (get_core_register_section): Remove xfree of NULL pointer.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/corelow.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 4e278f5..de4d90f 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
+
+ * corelow.c (sniff_core_bfd): Remove extra semicolon.
+ (get_core_register_section): Remove xfree of NULL pointer.
+
2017-05-03 Alan Hayward <alan.hayward@arm.com>
* frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
diff --git a/gdb/corelow.c b/gdb/corelow.c
index 3267c37..2266f24 100644
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -129,7 +129,7 @@ sniff_core_bfd (bfd *abfd)
{
struct core_fns *cf;
struct core_fns *yummy = NULL;
- int matches = 0;;
+ int matches = 0;
/* Don't sniff if we have support for register sets in
CORE_GDBARCH. */
@@ -511,7 +511,7 @@ get_core_register_section (struct regcache *regcache,
const char *human_name,
int required)
{
- static char *section_name = NULL;
+ static char *section_name;
struct bfd_section *section;
bfd_size_type size;
char *contents;
@@ -519,8 +519,6 @@ get_core_register_section (struct regcache *regcache,
&& regset->flags & REGSET_VARIABLE_SIZE);
ptid_t ptid = regcache_get_ptid (regcache);
- xfree (section_name);
-
if (ptid_get_lwp (ptid))
section_name = xstrprintf ("%s/%ld", name,
ptid_get_lwp (ptid));