We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c53a6ab commit 56a9e4dCopy full SHA for 56a9e4d
program/src/oracle/upd_aggregate.h
@@ -15,9 +15,9 @@ extern "C" {
15
16
static void pd_scale( pd_t *n )
17
{
18
- int neg = n->v_ < 0L;
19
- uint64_t v = neg?-n->v_:n->v_;
20
- for( ;v&0xfffffffff0000000UL; v/= 10UL, ++n->e_ );
+ int const neg = n->v_ < 0L;
+ int64_t v = neg ? -n->v_ : n->v_; // make v positive for loop condition
+ for( ; v >= ( 1L << 28 ); v /= 10L, ++n->e_ );
21
n->v_ = neg ? -v : v;
22
}
23
0 commit comments