uptime: Use sizeof instead of repeating the size
Signed-off-by: drkhsh <me@drkhsh.at>
This commit is contained in:
parent
c75cb9ad7a
commit
40f13be551
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue