]> Savannah Git Hosting - gnulib.git/commitdiff
vma-prot tests: Strengthen test.
authorBruno Haible <bruno@clisp.org>
Mon, 2 Sep 2024 11:49:05 +0000 (13:49 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 2 Sep 2024 11:58:38 +0000 (13:58 +0200)
Found by Coverity.

* tests/test-vma-prot.c (main): Fix typo.

ChangeLog
tests/test-vma-prot.c

index 2b8ee26738afec678eccadbbc0a18309275ec430..f45cb8ed912f9787efc963860f37c633444e8847 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-09-02  Bruno Haible  <bruno@clisp.org>
+
+       vma-prot tests: Strengthen test.
+       Found by Coverity.
+       * tests/test-vma-prot.c (main): Fix typo.
+
 2024-09-02  Simon Josefsson  <simon@josefsson.org>
 
        syntax-check: Catch obsolete Franklin Street usages.
index 24b5b1873acc241f8573982346d6834a41a2b7c1..dc100d3af3bf9af9e8cdf3c0210390c64ce07ee5 100644 (file)
@@ -65,7 +65,7 @@ main (void)
       {
         prot = get_vma_prot (mem, 1024*1024);
         ASSERT (prot != -1);
-        ASSERT (prot == VMA_PROT_READ | VMA_PROT_WRITE);
+        ASSERT (prot == (VMA_PROT_READ | VMA_PROT_WRITE));
 
         size_t pagesize = sysconf (_SC_PAGESIZE);
         if (pagesize <= 512*1024