{
unsigned r;
- /* Possible ways to approx. divide by 10
+ /*
+ * Possible ways to approx. divide by 10
* (x * 0x1999999a) >> 32 x < 1073741829 (multiply must be 64-bit)
* (x * 0xcccd) >> 19 x < 81920 (x < 262149 when 64-bit mul)
* (x * 0x6667) >> 18 x < 43699
/* Copy of previous function's body with added early returns */
q = (r * (uint64_t)0x1999999a) >> 32;
*buf++ = (r - 10 * q) + '0'; /* 2 */
- if (q == 0) return buf;
+ if (q == 0)
+ return buf;
r = (q * (uint64_t)0x1999999a) >> 32;
*buf++ = (q - 10 * r) + '0'; /* 3 */
- if (r == 0) return buf;
+ if (r == 0)
+ return buf;
q = (r * (uint64_t)0x1999999a) >> 32;
*buf++ = (r - 10 * q) + '0'; /* 4 */
- if (q == 0) return buf;
+ if (q == 0)
+ return buf;
r = (q * (uint64_t)0x1999999a) >> 32;
*buf++ = (q - 10 * r) + '0'; /* 5 */
- if (r == 0) return buf;
+ if (r == 0)
+ return buf;
q = (r * 0x199a) >> 16;
*buf++ = (r - 10 * q) + '0'; /* 6 */
- if (q == 0) return buf;
+ if (q == 0)
+ return buf;
r = (q * 0xcd) >> 11;
*buf++ = (q - 10 * r) + '0'; /* 7 */
- if (r == 0) return buf;
+ if (r == 0)
+ return buf;
q = (r * 0xcd) >> 11;
*buf++ = (r - 10 * q) + '0'; /* 8 */
- if (q == 0) return buf;
+ if (q == 0)
+ return buf;
*buf++ = q + '0'; /* 9 */
return buf;
}