summaryrefslogtreecommitdiff
path: root/slstatus.c
diff options
context:
space:
mode:
Diffstat (limited to 'slstatus.c')
-rw-r--r--slstatus.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/slstatus.c b/slstatus.c
index 572f964..fefdf6f 100644
--- a/slstatus.c
+++ b/slstatus.c
@@ -272,9 +272,7 @@ hostname(void)
}
fgets(hostname, sizeof(hostname), fp);
- /* FIXME: needs improvement */
- memset(&hostname[strlen(hostname)-1], '\0',
- sizeof(hostname) - strlen(hostname));
+ hostname[strlen(hostname)-1] = '\0';
fclose(fp);
return smprintf("%s", hostname);