changeset 18177:097125b332c4

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
author Paul Eggert <eggert@cs.ucla.edu>
date Thu, 17 Dec 2015 23:06:29 -0800
parents 40597d8c3a53
children 0ca3c962df7d
files ChangeLog lib/intprops.h
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Thu Dec 17 13:46:39 2015 -0800
+++ b/ChangeLog	Thu Dec 17 23:06:29 2015 -0800
@@ -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
--- a/lib/intprops.h	Thu Dec 17 13:46:39 2015 -0800
+++ b/lib/intprops.h	Thu Dec 17 23:06:29 2015 -0800
@@ -272,9 +272,10 @@
 
    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: