summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
authorAli H. Fardan <raiz@firemail.cc>2016-09-12 13:51:43 +0300
committerAli H. Fardan <raiz@firemail.cc>2016-09-12 13:51:43 +0300
commite6158e300d3134e44f741e01108dd088297c476f (patch)
tree7c54ee798211241c64953bd48c1a92556723fac2 /slstatus.c
parentd19d4aa2e8be789c7d3c4849a7c5d9fcec18da5d (diff)
subtraction is unneeded
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/slstatus.c b/slstatus.c
index e38b963..70d8fbb 100644
--- 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);