Skip to contentSkip to conversation

lib: correct __moddi3() description

PATCH In review Jan Beulich 2 participants 2 messages Sep 8, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lib: correct __moddi3() description

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.

xen/common/lib.c +1 -1
@@ -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)
 {