suckless/slstatus

uptime: Use sizeof instead of repeating the size (40f13be551f0e1a0eaee07dcb64b3b6ab3a68dd9)
Repositories | README | LICENSE

commit 40f13be551f0e1a0eaee07dcb64b3b6ab3a68dd9
parent c75cb9ad7af55d16b864b1059fbc1aaa9d9874de
Author: planet36 <[email protected]>
Date:   Thu, 25 Mar 2021 13:05:48 -0400

uptime: Use sizeof instead of repeating the size

Signed-off-by: drkhsh <[email protected]>

Diffstat:
Mcomponents/uptime.c2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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; }