From 986d894b2a5484e522d540b24c0c9cf266fabacb Mon Sep 17 00:00:00 2001 From: Trevor Saunders Date: Sun, 20 Mar 2016 01:07:55 -0400 Subject: [PATCH] tc-pdp11.c: remove useless code 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. gas/ChangeLog: 2016-03-22 Trevor Saunders * config/tc-pdp11.c (md_assemble): Remove useless if and assignment to str. --- gas/ChangeLog | 5 +++++ gas/config/tc-pdp11.c | 2 -- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index a6960a22e3c..845eacd5931 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2016-03-22 Trevor Saunders + + * config/tc-pdp11.c (md_assemble): Remove useless if and assignment to + str. + 2016-03-22 Trevor Saunders * config/tc-sparc.c (sparc_regname_to_dw2regnum): Replace strchr () diff --git a/gas/config/tc-pdp11.c b/gas/config/tc-pdp11.c index 89c75c32100..f1447541d84 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.30.2