]> Savannah Git Hosting - gnulib.git/commitdiff
fenv-exceptions-tracking-c99 tests: Fix typo.
authorBruno Haible <bruno@clisp.org>
Tue, 7 Nov 2023 01:24:37 +0000 (02:24 +0100)
committerBruno Haible <bruno@clisp.org>
Tue, 7 Nov 2023 01:24:37 +0000 (02:24 +0100)
Found by coverity.

* tests/test-fenv-except-tracking-1.c (main): Write & ~, not & !.

ChangeLog
tests/test-fenv-except-tracking-1.c

index 46a5974795ec074bd9c01ae729d1b311e462d673..bc9ed2e489976391e2562ffed75a348a7c418ee3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-11-06  Bruno Haible  <bruno@clisp.org>
+
+       fenv-exceptions-tracking-c99 tests: Fix typo.
+       Found by coverity.
+       * tests/test-fenv-except-tracking-1.c (main): Write & ~, not & !.
+
 2023-11-06  Bruno Haible  <bruno@clisp.org>
 
        snan: Avoid test failures on OpenBSD/mips64.
index b7f871e12bca16ea9bf5a67877f6e5827acf5904..79384499f1d718b306ea60f20f8a25cda3395323 100644 (file)
@@ -207,7 +207,7 @@ main ()
   c = a * b;
   {
     int exc = fetestexcept (FE_ALL_EXCEPT);
-    ASSERT ((FE_OVERFLOW & !exc) == 0);
+    ASSERT ((FE_OVERFLOW & ~exc) == 0);
     ASSERT ((exc & ~(FE_OVERFLOW | FE_INEXACT)) == 0);
   }
   ASSERT (fetestexcept (FE_INVALID) == 0);
@@ -222,7 +222,7 @@ main ()
   c = a * b;
   {
     int exc = fetestexcept (FE_ALL_EXCEPT);
-    ASSERT ((FE_UNDERFLOW & !exc) == 0);
+    ASSERT ((FE_UNDERFLOW & ~exc) == 0);
     ASSERT ((exc & ~(FE_UNDERFLOW | FE_INEXACT)) == 0);
   }
   ASSERT (fetestexcept (FE_INVALID) == 0);