* src/pinky.c (idle_string): Prefer intmax_t to unsigned long int;
this avoids an overflow on platforms where unsigned long is 32
bits and time_t is 64 bits (the bug could occur on such a system
that was idle for more than 6 million years, so it’s a bit
hard to supply a test case...).
}
else
{
- unsigned long int days = seconds_idle / (24 * 60 * 60);
- sprintf (buf, "%lud", days);
+ intmax_t days = seconds_idle / (24 * 60 * 60);
+ sprintf (buf, "%"PRIdMAX, days);
}
return buf;
}