projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c75cb9a
)
uptime: Use sizeof instead of repeating the size
author
planet36
<planet36@users.noreply.github.com>
Thu, 25 Mar 2021 17:05:48 +0000
(13:05 -0400)
committer
drkhsh
<me@drkhsh.at>
Mon, 19 Dec 2022 01:44:21 +0000
(
02:44
+0100)
Signed-off-by: drkhsh <me@drkhsh.at>
components/uptime.c
patch
|
blob
|
history
diff --git
a/components/uptime.c
b/components/uptime.c
index d97e5e8543f04c48d86b8bc15c707485f01452f7..6227f731a5afaf6dbb97b24aad9ca73d1340a945 100644
(file)
--- 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;
}