summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2016-01-08 21:55:58 +0100
committerMark Wielaard <mjw@redhat.com>2016-01-08 21:56:18 +0100
commit53e447113b60b56fb88109884749133d1b2e0d75 (patch)
tree0d00cc68ea4120f1ce23b29ebbe1b0e8cf0adac6
parent3a5fc51573ae88a06d2050ef8425336e23013852 (diff)
downloadelfutils-53e447113b60b56fb88109884749133d1b2e0d75.tar.gz
elfutils-53e447113b60b56fb88109884749133d1b2e0d75.tar.xz
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>
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/elfputzdata.c2
2 files changed, 5 insertions, 1 deletions
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);
}