This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Committed] tests: Fix parentheses in elfputzdata strncmp test.


We were checking strlen () == 0 instead of strncmp () == 0. Oops.

Signed-off-by: Mark Wielaard <mjw@redhat.com>
---
 tests/ChangeLog     | 4 ++++
 tests/elfputzdata.c | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/ChangeLog b/tests/ChangeLog
index 3d9353c..366aea9 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
 2016-01-08  Mark Wielaard  <mjw@redhat.com>
 
+	* elfputzdata.c (main): Fix parentheses in strncmp test.
+
+2016-01-08  Mark Wielaard  <mjw@redhat.com>
+
 	* elfputzdata.c (main): Use PRId64 to print 64 bit value.
 
 2016-01-08  Mark Wielaard  <mjw@redhat.com>
diff --git a/tests/elfputzdata.c b/tests/elfputzdata.c
index 67c6090..66ab77b 100644
--- a/tests/elfputzdata.c
+++ b/tests/elfputzdata.c
@@ -83,7 +83,7 @@ main (int argc, char *argv[])
 	      printf ("Cannot compress %zd %s\n", idx, name);
 	    }
 	  else if ((shdr->sh_flags & SHF_COMPRESSED) != 0
-		   || strncmp (name, ".zdebug", strlen (".zdebug") == 0))
+		   || strncmp (name, ".zdebug", strlen (".zdebug")) == 0)
 	    {
 	      printf ("Already compressed %zd %s\n", idx, name);
 	    }
-- 
2.5.0

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]