mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-05 15:48:06 +02:00
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:
parent
7713d13397
commit
0cb2179ae2
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue