commit 40f13be551f0e1a0eaee07dcb64b3b6ab3a68dd9
Author: planet36 <[email protected]>
AuthorDate: Thu Mar 25 13:05:48 2021 -0400
Commit: drkhsh <[email protected]>
CommitDate: Mon Dec 19 02:44:21 2022 +0100
uptime: Use sizeof instead of repeating the size
Signed-off-by: drkhsh <[email protected]>
diff --git a/components/uptime.c b/components/uptime.c
index d97e5e8..6227f73 100644
--- a/components/uptime.c
+++ b/components/uptime.c
@@ -22,7 +22,7 @@ uptime(const char *unused)
struct timespec uptime;
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);
return NULL;
}