gethostname can fail :-)

svn path=/trunk/kdebase/kdm/; revision=239075
icc-effect-5.14.5
Marc Mutz 2003-07-25 12:35:58 +00:00
parent f9cef6de17
commit ca09935838
1 changed files with 2 additions and 1 deletions

View File

@ -3058,7 +3058,8 @@ QCString Client::staticWmClientMachine(WId w)
result = "localhost";
} else {
// special name for the local machine (localhost)
char hostnamebuf[80];
char hostnamebuf[256];
hostnamebuf[0] = '\0';
if (gethostname (hostnamebuf, sizeof hostnamebuf) >= 0) {
hostnamebuf[sizeof(hostnamebuf)-1] = 0;
if (result == hostnamebuf)