null, not newline!

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1171 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Robert Love 2005-12-12 19:20:17 +00:00
parent 7713d13397
commit 0cb2179ae2

View file

@ -190,7 +190,7 @@ static const char * get_host_name (void)
char hostname[HOST_NAME_MAX] = "hostname";
gethostname (hostname, HOST_NAME_MAX);
hostname[HOST_NAME_MAX-1] = '\n'; /* unspecified whether a truncated hostname is terminated */
hostname[HOST_NAME_MAX-1] = '\0'; /* unspecified whether a truncated hostname is terminated */
#endif
return hostname;