This patch fixes Coverity ID 169307.
Fixes:
1ec3d69b0ed8 ("Implement a better num2str()")
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
* Divide by K/Ki until string length of num <= maxlen.
*/
modulo = -1U;
* Divide by K/Ki until string length of num <= maxlen.
*/
modulo = -1U;
- while (post_index < sizeof(sistr)) {
+ while (post_index < ARRAY_SIZE(sistr)) {
sprintf(tmp, "%llu", (unsigned long long) num);
if (strlen(tmp) <= maxlen)
break;
sprintf(tmp, "%llu", (unsigned long long) num);
if (strlen(tmp) <= maxlen)
break;