This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH 2/3] tc-pdp11.c: remove useless code
- From: tbsaunde+binutils at tbsaunde dot org
- To: binutils at sourceware dot org
- Cc: Trevor Saunders <tbsaunde+binutils at tbsaunde dot org>
- Date: Sun, 20 Mar 2016 15:46:35 -0400
- Subject: [PATCH 2/3] tc-pdp11.c: remove useless code
- Authentication-results: sourceware.org; auth=none
- References: <1458503196-23504-1-git-send-email-tbsaunde+binutils at tbsaunde dot org>
From: Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
HI,
if the condition is true then we know that str already points to a'\0' in the
string passed to the function. Since we know the latter part of the function
doesn't modify that string, and str already points to a null byte there's no
point in changing str to point to a literal empty string.
built and regtested a cross to pdp11-aout, ok?
Trev
gas/ChangeLog:
2016-03-20 Trevor Saunders <tbsaunde+binutils@tbsaunde.org>
* config/tc-pdp11.c (md_assemble): Remove useless if and assignment to
str.
---
gas/config/tc-pdp11.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c
index 89c75c3..f144754 100644
--- a/gas/config/tc-pdp11.c
+++ b/gas/config/tc-pdp11.c
@@ -697,8 +697,6 @@ md_assemble (char *instruction_string)
{
case PDP11_OPCODE_NO_OPS:
str = skip_whitespace (str);
- if (*str == 0)
- str = "";
break;
case PDP11_OPCODE_IMM3:
--
2.1.4