This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[commit#2] [patch] gdbserver <library-list> and its #FIXED version="1.0"


On Wed, 10 Jun 2015 18:31:21 +0200, Jan Kratochvil wrote:
> On Mon, 08 Jun 2015 11:07:56 +0200, Gary Benson wrote:
> > The "if (version)" should likely be "if (version != NULL)".

I forgot about this part.  Checked in as obvious.


Jan
--- Begin Message ---
gdb/ChangeLog
2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>

	Code cleanup.
	* solib-target.c (library_list_start_list): Use explicit NULL
	comparison.
---
 gdb/ChangeLog      | 6 ++++++
 gdb/solib-target.c | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 83845f4..5b19052 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,5 +1,11 @@
 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
 
+	Code cleanup.
+	* solib-target.c (library_list_start_list): Use explicit NULL
+	comparison.
+
+2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
 	* solib-target.c (library_list_start_list): Do not dereference
 	variable version in its initialization.  Make the VERSION check handle
 	NULL.
diff --git a/gdb/solib-target.c b/gdb/solib-target.c
index 891e572..f14363a 100644
--- a/gdb/solib-target.c
+++ b/gdb/solib-target.c
@@ -149,7 +149,7 @@ library_list_start_list (struct gdb_xml_parser *parser,
   struct gdb_xml_value *version = xml_find_attribute (attributes, "version");
 
   /* #FIXED attribute may be omitted, Expat returns NULL in such case.  */
-  if (version)
+  if (version != NULL)
     {
       const char *string = version->value;
 
-- 
2.1.0

--- End Message ---

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]