[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdebase/ksmserver
From:       Luboš Luňák <l.lunak () kde ! org>
Date:       2004-03-04 10:37:46
Message-ID: 20040304103746.407559980 () office ! kde ! org
[Download RAW message or body]

CVS commit by lunakl: 

Wow, this was obscure C-ism.
CCMAIL: 76682-done@bugs.kde.org


  M +5 -3      server.cpp   1.124


--- kdebase/ksmserver/server.cpp  #1.123:1.124
@@ -1832,9 +1832,11 @@ QString KSMServer::windowWmClientMachine
             if (result == hostnamebuf)
                 result = "localhost";
-            char *dot = strchr(hostnamebuf, '.');
-            if (dot && !(*dot = 0) && result == hostnamebuf)
+            if(char *dot = strchr(hostnamebuf, '.')) {
+                *dot = '\0';
+                if(result == hostnamebuf)
                 result = "localhost";
         }
     }
+    }
     return QString::fromLatin1(result);
 }


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic