diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-05 11:31:46 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-02-05 11:31:46 -0800 |
commit | 5482a15e17cfc80379052253003e5a6b0cd46f14 (patch) | |
tree | 3eaf2d5f1649eceea5289876b63c9052e625e750 | |
parent | 25e2b40ac2db6663086f98bcba534e8dbb02dd34 (diff) | |
download | nasm-5482a15e17cfc80379052253003e5a6b0cd46f14.tar.gz |
codeview.c: remove superfluous pointer test
A pointer to a field in a structure can never be NULL so remove
the test. There is no reason to test the field for an empty string
either, since we immediately thereafter do a strcmp().
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
-rw-r--r-- | output/codeview.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/output/codeview.c b/output/codeview.c index 4256e8dd..2f5bb690 100644 --- a/output/codeview.c +++ b/output/codeview.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- * * - * Copyright 1996-2010 The NASM Authors - All Rights Reserved + * Copyright 1996-2016 The NASM Authors - All Rights Reserved * See the file AUTHORS included with the NASM distribution for * the specific copyright holders. * @@ -402,7 +402,7 @@ static void register_reloc(struct coff_Section *const sect, for (uint32_t i = 0; i < coff_nsyms; i++) { struct coff_Symbol *s = saa_rstruct(coff_syms); r->symbol++; - if (s->strpos == -1 && s->name && !strcmp(sym, s->name)) { + if (s->strpos == -1 && !strcmp(sym, s->name)) { return; } else if (s->strpos != -1) { int res; |