[PATCH] Return name instead of False in XSetICValues()

Yann Droneaud yann at droneaud.fr
Tue Oct 11 08:27:59 PDT 2011


In case of error, XSetICValues() must return the first argument
that failed to be set.

But in some error paths, it returns False, which is converted to NULL,
so the function returns OK in case of error.

Signed-off-by: Yann Droneaud <yann at droneaud.fr>

---
 modules/im/ximcp/imRm.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c
index 53b2458..519d174 100644
--- a/modules/im/ximcp/imRm.c
+++ b/modules/im/ximcp/imRm.c
@@ -2885,13 +2885,13 @@ _XimSetICValueData(
 
 	    if(mode & XIM_PREEDIT_ATTR) {
 		if (!_XimEncodeLocalPreeditValue(ic, res, (XPointer)p))
-	    	    return False;
+	    	    return p->name;
     	    } else if(mode & XIM_STATUS_ATTR) {
 		if (!_XimEncodeLocalStatusValue(ic, res, (XPointer)p))
-	    	    return False;
+	    	    return p->name;
     	    } else {
 		if (!_XimEncodeLocalTopValue(ic, res, (XPointer)p, flag))
-	    	    return False;
+	    	    return p->name;
     	    }
 	    if(_XimEncodeLocalICAttr(ic, res, top, p, mode) == False) {
 		return p->name;
-- 
1.7.6.4



More information about the xorg-devel mailing list