public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Gary Benson <gbenson@redhat.com>, Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: [commit#2] [patch] gdbserver <library-list> and its #FIXED version="1.0"
Date: Wed, 10 Jun 2015 17:38:00 -0000	[thread overview]
Message-ID: <20150610173819.GA24034@host1.jankratochvil.net> (raw)
In-Reply-To: <20150610163121.GA2683@host1.jankratochvil.net>

[-- Attachment #1: Type: text/plain, Size: 236 bytes --]

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

[-- Attachment #2: Type: message/rfc822, Size: 1402 bytes --]

From: Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: [PATCH] Code cleanup: Use explicit NULL comparison
Date: Wed, 10 Jun 2015 19:37:19 +0200

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

  reply	other threads:[~2015-06-10 17:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-03 19:17 Jan Kratochvil
2015-06-07 14:11 ` ping: " Jan Kratochvil
2015-06-08  9:08   ` Gary Benson
2015-06-10 16:31     ` [commit] " Jan Kratochvil
2015-06-10 17:38       ` Jan Kratochvil [this message]
2015-06-10 16:17 ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150610173819.GA24034@host1.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gbenson@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).