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:
d19d4aa
)
subtraction is unneeded
author
Ali H. Fardan
<raiz@firemail.cc>
Mon, 12 Sep 2016 10:51:43 +0000
(13:51 +0300)
committer
Ali H. Fardan
<raiz@firemail.cc>
Mon, 12 Sep 2016 10:51:43 +0000
(13:51 +0300)
slstatus.c
patch
|
blob
|
history
diff --git
a/slstatus.c
b/slstatus.c
index e38b96327d0fa45266d3332811091f686c764ccb..70d8fbbf47dcd1b78950d6ed078d2a882b55e4ad 100644
(file)
--- a/
slstatus.c
+++ b/
slstatus.c
@@
-260,7
+260,7
@@
hostname(void)
fgets(hostname, sizeof(hostname), fp);
/* FIXME: needs improvement */
- memset(&hostname[strlen(hostname)
-1
], '\0',
+ memset(&hostname[strlen(hostname)], '\0',
sizeof(hostname) - strlen(hostname));
fclose(fp);