if (n < 1023949) /* 10K - 999K */
/* 51 is magic which causes 10189/10240 to be rounded up to 10 */
- return snprintf(s, len, "%ldK", (n + 51) / 1024);
+ return snprintf(s, len, "%ldK", (n + 51) / 1024L);
if (n < 10433332) /* 1.0M - 9.9M */
return snprintf(s, len, "%3.1fM", n / 1048576.0);
/* (10433332 + 52428) / 1048576 = 10 */
- return snprintf (s, len, "%ldM", (n + 52428) / 1048576);
+ return snprintf (s, len, "%ldM", (n + 52428) / 1048576L);
}
/*