subtraction is unneeded

This commit is contained in:
Ali H. Fardan 2016-09-12 13:51:43 +03:00
parent d19d4aa2e8
commit e6158e300d
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ hostname(void)
fgets(hostname, sizeof(hostname), fp); fgets(hostname, sizeof(hostname), fp);
/* FIXME: needs improvement */ /* FIXME: needs improvement */
memset(&hostname[strlen(hostname)-1], '\0', memset(&hostname[strlen(hostname)], '\0',
sizeof(hostname) - strlen(hostname)); sizeof(hostname) - strlen(hostname));
fclose(fp); fclose(fp);