Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109307243
D40835.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40835.diff
View Options
diff --git a/sys/libkern/divdi3.c b/sys/libkern/divdi3.c
--- a/sys/libkern/divdi3.c
+++ b/sys/libkern/divdi3.c
@@ -47,13 +47,17 @@
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
--- a/sys/libkern/divmoddi4.c
+++ b/sys/libkern/divmoddi4.c
@@ -44,13 +44,19 @@
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
--- a/sys/libkern/moddi3.c
+++ b/sys/libkern/moddi3.c
@@ -47,10 +47,13 @@
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Feb 4, 8:49 AM (20 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16450813
Default Alt Text
D40835.diff (1 KB)
Attached To
Mode
D40835: divmoddi*: Use separate statements instead of the comma operator.
Attached
Detach File
Event Timeline
Log In to Comment