summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplanet36 <planet36@users.noreply.github.com>2021-03-25 13:05:48 -0400
committerdrkhsh <me@drkhsh.at>2022-12-19 02:44:21 +0100
commit40f13be551f0e1a0eaee07dcb64b3b6ab3a68dd9 (patch)
tree87a97f74b3178c2ae87a753e775790320930a7f3
parentc75cb9ad7af55d16b864b1059fbc1aaa9d9874de (diff)
downloadslstatus-40f13be551f0e1a0eaee07dcb64b3b6ab3a68dd9.tar.gz
uptime: Use sizeof instead of repeating the size
Signed-off-by: drkhsh <me@drkhsh.at>
-rw-r--r--components/uptime.c2
1 files changed, 1 insertions, 1 deletions
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;
}