diff mbox series

lib: correct __moddi3() description

Message ID 6c8ab543-67dd-62ed-2542-48fa7395e541@suse.com
State New
Headers show
Series lib: correct __moddi3() description | expand

Commit Message

Jan Beulich Sept. 8, 2020, 12:54 p.m. UTC
The remainder of a division, when non-zero, is specified to always be of
the same sign as the dividend. Bring a comment in line with the code it
describes.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

Comments

Andrew Cooper Sept. 8, 2020, 1:13 p.m. UTC | #1
On 08/09/2020 13:54, Jan Beulich wrote:
> The remainder of a division, when non-zero, is specified to always be of
> the same sign as the dividend. Bring a comment in line with the code it
> describes.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>

Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
diff mbox series

Patch

--- a/xen/common/lib.c
+++ b/xen/common/lib.c
@@ -390,7 +390,7 @@  u64 __umoddi3(u64 a, u64 b)
  *  11 %  5 =  1
  * -11 %  5 = -1
  *  11 % -5 =  1
- * -11 % -5 =  1
+ * -11 % -5 = -1
  */
 s64 __moddi3(s64 a, s64 b)
 {