diff options
author | planet36 <planet36@users.noreply.github.com> | 2021-03-25 13:05:48 -0400 |
---|---|---|
committer | Rafael Marçalo <raroma09@gmail.com> | 2023-01-03 15:02:10 +0000 |
commit | 584412ad792cd7b363efe4d615ab2291f3284213 (patch) | |
tree | 7903d7cc337dc155a439f057117dc03cad61d8a4 | |
parent | fbb415f12ddb87453a77f5967aea2c806c1b6d96 (diff) |
uptime: Use sizeof instead of repeating the size
Signed-off-by: drkhsh <me@drkhsh.at>
-rw-r--r-- | components/uptime.c | 2 |
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; } |