[PATCH libX11] modules/im/ximcp/imDefIc.c: simplify code

walter harms wharms at bfs.de
Sat Jul 12 08:53:47 PDT 2014


the if will return false as the function would do anyway

Signed-off-by: Harms <wharms at bfs,de>
---
 modules/im/ximcp/imDefIc.c | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/modules/im/ximcp/imDefIc.c b/modules/im/ximcp/imDefIc.c
index 143bd59..21f2f8f 100644
--- a/modules/im/ximcp/imDefIc.c
+++ b/modules/im/ximcp/imDefIc.c
@@ -820,21 +820,14 @@ _XimDestroyICCheck(
     CARD8	 minor_opcode = *((CARD8 *)data + 1);
     XIMID	 imid = buf_s[0];
     XICID	 icid = buf_s[1];
-    Bool	 ret = False;

     if ((major_opcode == XIM_DESTROY_IC_REPLY)
      && (minor_opcode == 0)
      && (imid == im->private.proto.imid)
      && (icid == ic->private.proto.icid))
-	ret = True;
-    if ((major_opcode == XIM_ERROR)
-     && (minor_opcode == 0)
-     && (buf_s[2] & XIM_IMID_VALID)
-     && (imid == im->private.proto.imid)
-     && (buf_s[2] & XIM_ICID_VALID)
-     && (icid == ic->private.proto.icid))
-    ret = False;
-    return ret;
+	return True;
+
+    return False;
 }

 static void
-- 
1.8.4.5



More information about the xorg-devel mailing list