This is the mail archive of the
binutils-cvs@sourceware.org
mailing list for the binutils project.
[binutils-gdb] Remove redundant sizeof on EXPECTED_VIEW_LENGTH
- From: H.J.Lu <hjl at sourceware dot org>
- To: bfd-cvs at sourceware dot org
- Date: 14 May 2016 12:52:13 -0000
- Subject: [binutils-gdb] Remove redundant sizeof on EXPECTED_VIEW_LENGTH
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=bf6f87e726c7e585402575a0976c717c6edd9817
commit bf6f87e726c7e585402575a0976c717c6edd9817
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Sat May 14 05:51:28 2016 -0700
Remove redundant sizeof on EXPECTED_VIEW_LENGTH
PR ld/20097
* testplug2.c (onall_symbols_read): Remove redundant sizeof
on EXPECTED_VIEW_LENGTH.
* testplug4.c (onall_symbols_read): Likewise.
Diff:
---
ld/ChangeLog | 7 +++++++
ld/testplug2.c | 2 +-
ld/testplug4.c | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/ld/ChangeLog b/ld/ChangeLog
index 13f8c0b..291c751 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,10 @@
+2016-05-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR ld/20097
+ * testplug2.c (onall_symbols_read): Remove redundant sizeof
+ on EXPECTED_VIEW_LENGTH.
+ * testplug4.c (onall_symbols_read): Likewise.
+
2016-05-13 H.J. Lu <hongjiu.lu@intel.com>
PR ld/20093
diff --git a/ld/testplug2.c b/ld/testplug2.c
index 5e34643..5dc4e78 100644
--- a/ld/testplug2.c
+++ b/ld/testplug2.c
@@ -602,7 +602,7 @@ onall_symbols_read (void)
#define EXPECTED_VIEW "/* The first line of this file must match the expectation of"
#define EXPECTED_VIEW_LENGTH (sizeof (EXPECTED_VIEW) - 1)
if (file.filesize != SIZE_OF_FUNC_C
- || SIZE_OF_FUNC_C < sizeof EXPECTED_VIEW_LENGTH
+ || SIZE_OF_FUNC_C < EXPECTED_VIEW_LENGTH
|| memcmp (view, EXPECTED_VIEW, EXPECTED_VIEW_LENGTH) != 0)
{
char result[EXPECTED_VIEW_LENGTH + 1];
diff --git a/ld/testplug4.c b/ld/testplug4.c
index fe7665a..86bad65 100644
--- a/ld/testplug4.c
+++ b/ld/testplug4.c
@@ -608,7 +608,7 @@ onall_symbols_read (void)
#define EXPECTED_VIEW "/* The first line of this file must match the expectation of"
#define EXPECTED_VIEW_LENGTH (sizeof (EXPECTED_VIEW) - 1)
if (file.filesize != SIZE_OF_PR20070B_C
- || SIZE_OF_PR20070B_C < sizeof EXPECTED_VIEW_LENGTH
+ || SIZE_OF_PR20070B_C < EXPECTED_VIEW_LENGTH
|| memcmp (view, EXPECTED_VIEW, EXPECTED_VIEW_LENGTH) != 0)
{
char result[EXPECTED_VIEW_LENGTH + 1];