1
0
mirror of https://frontier.innolan.net/rainlance/amiga-ntimed.git synced 2025-11-23 20:22:17 +00:00

A bit of signed/unsigned cleanup work.

This commit is contained in:
Poul-Henning Kamp
2015-01-16 21:21:15 +00:00
parent 76ccc26b27
commit 449dc16d47
10 changed files with 49 additions and 46 deletions

View File

@ -140,10 +140,11 @@ TS_SleepUntil(const struct timestamp *t)
/**********************************************************************/
void
TS_Format(char *buf, ssize_t len, const struct timestamp *ts)
TS_Format(char *buf, size_t len, const struct timestamp *ts)
{
CHECK_OBJ_NOTNULL(ts, TIMESTAMP_MAGIC);
uint64_t x, y;
int i;
/* XXX: Nanosecond precision is enough for everybody. */
x = ts->sec;
@ -152,7 +153,8 @@ TS_Format(char *buf, ssize_t len, const struct timestamp *ts)
y -= 1000000000ULL;
x += 1;
}
assert(snprintf(buf, len, "%jd.%09jd", (intmax_t)x, (intmax_t)y) < len);
i = snprintf(buf, len, "%jd.%09jd", (intmax_t)x, (intmax_t)y);
assert(i < (int)len);
}
/**********************************************************************