subtraction is unneeded

This commit is contained in:
Ali H. Fardan 2016-09-12 13:51:43 +03:00
parent d19d4aa2e8
commit e6158e300d

View File

@ -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);