aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/libkern/divdi3.c18
-rw-r--r--sys/libkern/divmoddi4.c20
-rw-r--r--sys/libkern/moddi3.c11
3 files changed, 31 insertions, 18 deletions
diff --git a/sys/libkern/divdi3.c b/sys/libkern/divdi3.c
index 8e04a81abdba..5800388a8704 100644
--- a/sys/libkern/divdi3.c
+++ b/sys/libkern/divdi3.c
@@ -47,13 +47,17 @@ __divdi3(quad_t a, quad_t b)
u_quad_t ua, ub, uq;
int neg;
- if (a < 0)
- ua = -(u_quad_t)a, neg = 1;
- else
- ua = a, neg = 0;
- if (b < 0)
- ub = -(u_quad_t)b, neg ^= 1;
- else
+ if (a < 0) {
+ ua = -(u_quad_t)a;
+ neg = 1;
+ } else {
+ ua = a;
+ neg = 0;
+ }
+ if (b < 0) {
+ ub = -(u_quad_t)b;
+ neg ^= 1;
+ } else
ub = b;
uq = __qdivrem(ua, ub, (u_quad_t *)0);
return (neg ? -uq : uq);
diff --git a/sys/libkern/divmoddi4.c b/sys/libkern/divmoddi4.c
index af0013532882..67a95b82d24b 100644
--- a/sys/libkern/divmoddi4.c
+++ b/sys/libkern/divmoddi4.c
@@ -44,13 +44,19 @@ __divmoddi4(quad_t a, quad_t b, quad_t *rem)
u_quad_t ua, ub, uq, urem;
int negq, negr;
- if (a < 0)
- ua = -(u_quad_t)a, negq = 1, negr = 1;
- else
- ua = a, negq = 0, negr = 0;
- if (b < 0)
- ub = -(u_quad_t)b, negq ^= 1;
- else
+ if (a < 0) {
+ ua = -(u_quad_t)a;
+ negq = 1;
+ negr = 1;
+ } else {
+ ua = a;
+ negq = 0;
+ negr = 0;
+ }
+ if (b < 0) {
+ ub = -(u_quad_t)b;
+ negq ^= 1;
+ } else
ub = b;
uq = __qdivrem(ua, ub, &urem);
if (rem != 0)
diff --git a/sys/libkern/moddi3.c b/sys/libkern/moddi3.c
index 0dbff4bdce89..60c3a85bb6e7 100644
--- a/sys/libkern/moddi3.c
+++ b/sys/libkern/moddi3.c
@@ -47,10 +47,13 @@ __moddi3(quad_t a, quad_t b)
u_quad_t ua, ub, ur;
int neg;
- if (a < 0)
- ua = -(u_quad_t)a, neg = 1;
- else
- ua = a, neg = 0;
+ if (a < 0) {
+ ua = -(u_quad_t)a;
+ neg = 1;
+ } else {
+ ua = a;
+ neg = 0;
+ }
if (b < 0)
ub = -(u_quad_t)b;
else