From b5a108624331fabf393223c0891914cc54d4caf4 Mon Sep 17 00:00:00 2001 From: Yann Droneaud Date: Tue, 11 Oct 2011 17:27:59 +0200 Subject: Return name instead of False in XSetICValues() 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 Reviewed-by: Jeremy Huddleston --- modules/im/ximcp/imRm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/im/ximcp/imRm.c b/modules/im/ximcp/imRm.c index 53b2458..01e74c2 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; -- cgit v1.2.3