1
0
Fork 0

uptime: Use sizeof instead of repeating the size

Signed-off-by: drkhsh <me@drkhsh.at>
This commit is contained in:
planet36 2021-03-25 13:05:48 -04:00 committed by drkhsh
parent c75cb9ad7a
commit 40f13be551

View file

@ -22,7 +22,7 @@ uptime(const char *unused)
struct timespec uptime; struct timespec uptime;
if (clock_gettime(UPTIME_FLAG, &uptime) < 0) { if (clock_gettime(UPTIME_FLAG, &uptime) < 0) {
snprintf(warn_buf, 256, "clock_gettime %d", UPTIME_FLAG); snprintf(warn_buf, sizeof(warn_buf), "clock_gettime %d", UPTIME_FLAG);
warn(warn_buf); warn(warn_buf);
return NULL; return NULL;
} }