From 40f13be551f0e1a0eaee07dcb64b3b6ab3a68dd9 Mon Sep 17 00:00:00 2001 From: planet36 Date: Thu, 25 Mar 2021 13:05:48 -0400 Subject: [PATCH] uptime: Use sizeof instead of repeating the size Signed-off-by: drkhsh --- components/uptime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }