]> Savannah Git Hosting - gnulib.git/commitdiff
intprops: comment fix
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Dec 2015 07:06:29 +0000 (23:06 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 18 Dec 2015 07:06:29 +0000 (23:06 -0800)
* lib/intprops.h: Fix comment. Reported by Pádraig Brady in:
http://lists.gnu.org/archive/html/bug-gnulib/2015-12/msg00013.html

ChangeLog
lib/intprops.h

index 4fb4b97db88e0596cb951b8561135eef4df354a5..3945c58d20f38113035b938ef2eea37ff0329cb1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2015-12-17  Paul Eggert  <eggert@cs.ucla.edu>
 
+       intprops: comment fix
+       * lib/intprops.h: Fix comment.  Reported by Pádraig Brady in:
+       http://lists.gnu.org/archive/html/bug-gnulib/2015-12/msg00013.html
+
        intprops-test: work around GCC bug 68971
        Problem reported by Pádraig Brady in:
        http://lists.gnu.org/archive/html/bug-gnulib/2015-12/msg00011.html
index 8fff86d437190a835933df76a6f28587949b1a35..ecafaf70e155d330121b88b7439b5bcf5de8e373 100644 (file)
 
    Example usage, assuming A and B are long int:
 
-     long int result = INT_MULTIPLY_WRAPV (a, b);
-     printf ("result is %ld (%s)\n", result,
-             INT_MULTIPLY_OVERFLOW (a, b) ? "after overflow" : "no overflow");
+     if (INT_MULTIPLY_OVERFLOW (a, b))
+       printf ("result would overflow\n");
+     else
+       printf ("result is %ld (no overflow)\n", a * b);
 
    Example usage with WRAPV flavor: