show: Clean up long vs. int in fmttime2822() for Windows
fmttime2822() prints long with format %d, and passes long to abs(). Harmless, because both int and long are 32 bits in the Windows API. Clean it up anyway. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
3872604ce0
commit
ac0e41a8f3
1 changed files with 3 additions and 3 deletions
|
@ -31,7 +31,7 @@
|
||||||
* Jeff Bailey, 1990
|
* Jeff Bailey, 1990
|
||||||
* Steve McClure, 1996
|
* Steve McClure, 1996
|
||||||
* Ron Koenderink, 2005-2009
|
* Ron Koenderink, 2005-2009
|
||||||
* Markus Armbruster, 2006-2016
|
* Markus Armbruster, 2006-2017
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
|
@ -632,8 +632,8 @@ fmttime2822(time_t t)
|
||||||
time_offset = -(tzi.Bias +
|
time_offset = -(tzi.Bias +
|
||||||
(time->tm_isdst ? tzi.DaylightBias : tzi.StandardBias));
|
(time->tm_isdst ? tzi.DaylightBias : tzi.StandardBias));
|
||||||
|
|
||||||
nn = _snprintf(buf + n, sizeof(buf) - n, " %+03d%02d",
|
nn = _snprintf(buf + n, sizeof(buf) - n, " %+03ld%02ld",
|
||||||
time_offset / 60, abs(time_offset) % 60);
|
time_offset / 60, labs(time_offset) % 60);
|
||||||
if (CANT_HAPPEN(nn <= 0 || nn + n >= sizeof(buf)))
|
if (CANT_HAPPEN(nn <= 0 || nn + n >= sizeof(buf)))
|
||||||
buf[0] = 0;
|
buf[0] = 0;
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue