[PATCH 21/22] os: Use local variable to hold pointer to OsCommPtr

Pauli ext-pauli.nieminen at nokia.com
Wed Dec 29 11:27:33 PST 2010


From: Pauli Nieminen <ext-pauli.nieminen at nokia.com>

Local variable eliminates some casts to OsCommPtr.

Signed-off-by: Pauli Nieminen <ext-pauli.nieminen at nokia.com>
---
 os/access.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/os/access.c b/os/access.c
index 494986e..3fc5896 100644
--- a/os/access.c
+++ b/os/access.c
@@ -1034,13 +1034,15 @@ Bool LocalClient(ClientPtr client)
     Xtransaddr		*from = NULL;
     pointer		addr;
     register HOST	*host;
+    OsCommPtr		oc;
 
     if (!client->osPrivate)
         return FALSE;
-    if (!((OsCommPtr)client->osPrivate)->trans_conn)
+    oc = client->osPrivate;
+    if (!oc->trans_conn)
         return FALSE;
 
-    if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn,
+    if (!_XSERVTransGetPeerAddr (oc->trans_conn,
 	&notused, &alen, &from))
     {
 	family = ConvertAddr ((struct sockaddr *) from,
-- 
1.7.0.4



More information about the xorg-devel mailing list