dix: use a single return statement in CheckPassiveGrabsOnWindow

No functional change.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Chase Douglas <chase.douglas@canonical.com>
This commit is contained in:
Peter Hutterer 2011-11-04 15:37:32 +10:00
parent b371795f01
commit 4acf999c29

View File

@ -3788,14 +3788,13 @@ CheckPassiveGrabsOnWindow(
} }
if (!activate) if (!activate)
{ break;
return grab;
}
else if (!GetXIType(event) && !GetCoreType(event)) else if (!GetXIType(event) && !GetCoreType(event))
{ {
ErrorF("Event type %d in CheckPassiveGrabsOnWindow is neither" ErrorF("Event type %d in CheckPassiveGrabsOnWindow is neither"
" XI 1.x nor core\n", event->any.type); " XI 1.x nor core\n", event->any.type);
return NULL; grab = NULL;
break;
} }
/* The only consumers of corestate are Xi 1.x and core events, which /* The only consumers of corestate are Xi 1.x and core events, which
@ -3861,9 +3860,10 @@ CheckPassiveGrabsOnWindow(
} }
free(xE); free(xE);
return grab; break;
} }
return NULL;
return grab;
#undef CORE_MATCH #undef CORE_MATCH
#undef XI_MATCH #undef XI_MATCH
#undef XI2_MATCH #undef XI2_MATCH