public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: binutils@sourceware.org
Cc: toolchain-devel@blackfin.uclinux.org
Subject: [PATCH] opcodes: blackfin: drop null/nul checks in OUTS
Date: Mon, 21 Feb 2011 17:14:00 -0000	[thread overview]
Message-ID: <1298308450-18769-1-git-send-email-vapier@gentoo.org> (raw)

Parts of the disassembler rely on the disasm info never being NULL (such
as being able to read memory to disassemble in the first place).  So drop
useless null checks in the OUTS helper.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>

2011-02-05  Mike Frysinger  <vapier@gentoo.org>

	* bfin-dis.c (OUTS): Remove p NULL check and txt NUL check.
---
 opcodes/bfin-dis.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c
index e7c81b4..3a23fd9 100644
--- a/opcodes/bfin-dis.c
+++ b/opcodes/bfin-dis.c
@@ -490,7 +490,7 @@ static const enum machine_registers decode_allregs[] =
 
 /* (arch.pm)arch_disassembler_functions.  */
 #ifndef OUTS
-#define OUTS(p, txt) ((p) ? (((txt)[0]) ? (p->fprintf_func)(p->stream, "%s", txt) :0) :0)
+#define OUTS(p, txt) (p)->fprintf_func ((p)->stream, "%s", txt)
 #endif
 
 static void
-- 
1.7.4.1

                 reply	other threads:[~2011-02-21 17:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1298308450-18769-1-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=binutils@sourceware.org \
    --cc=toolchain-devel@blackfin.uclinux.org \
    /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).