2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-01 14:55:30 +00:00

cast time_t to unsigned long and use %lu instead of %u

This commit is contained in:
Mark Andrews
2010-09-14 04:01:33 +00:00
parent 6aaaf6a460
commit a96cdbe1f8

View File

@@ -1492,8 +1492,8 @@ print_time(TIME t)
if ((strftime(buf1, sizeof(buf1), if ((strftime(buf1, sizeof(buf1),
"# %a %b %d %H:%M:%S %Y", "# %a %b %d %H:%M:%S %Y",
localtime(&t)) == 0) || localtime(&t)) == 0) ||
(snprintf(buf, sizeof(buf), "epoch %u; %s", (snprintf(buf, sizeof(buf), "epoch %lu; %s",
since_epoch, buf1) >= sizeof(buf))) (unsigned long)since_epoch, buf1) >= sizeof(buf)))
return NULL; return NULL;
} else { } else {