public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] opcodes: blackfin: drop null/nul checks in OUTS
@ 2011-02-21 17:14 Mike Frysinger
  0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2011-02-21 17:14 UTC (permalink / raw)
  To: binutils; +Cc: toolchain-devel

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-02-21 17:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-21 17:14 [PATCH] opcodes: blackfin: drop null/nul checks in OUTS Mike Frysinger

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).