commit
5609b9d9de
1 changed files with 1 additions and 3 deletions
|
@ -272,9 +272,7 @@ hostname(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
fgets(hostname, sizeof(hostname), fp);
|
fgets(hostname, sizeof(hostname), fp);
|
||||||
/* FIXME: needs improvement */
|
hostname[strlen(hostname)-1] = '\0';
|
||||||
memset(&hostname[strlen(hostname)-1], '\0',
|
|
||||||
sizeof(hostname) - strlen(hostname));
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
|
||||||
return smprintf("%s", hostname);
|
return smprintf("%s", hostname);
|
||||||
|
|
Loading…
Reference in a new issue