[mutter/wip/carlosg/coverity-fixes: 1/13] core: Drop repeated early return condition in function
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/carlosg/coverity-fixes: 1/13] core: Drop repeated early return condition in function
- Date: Tue, 26 Oct 2021 12:39:09 +0000 (UTC)
commit 70a5f29ef1fe81ec76eb47d00d806350e5c2d742
Author: Carlos Garnacho <carlosg gnome org>
Date: Sun Oct 24 19:16:42 2021 +0200
core: Drop repeated early return condition in function
We are already checking for prev_state == META_SEQUENCE_PENDING_END,
no need to do it twice.
CID: #1418251
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
src/core/meta-gesture-tracker.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/core/meta-gesture-tracker.c b/src/core/meta-gesture-tracker.c
index 2badf8b823..33ee834e30 100644
--- a/src/core/meta-gesture-tracker.c
+++ b/src/core/meta-gesture-tracker.c
@@ -227,6 +227,7 @@ static gboolean
state_is_applicable (MetaSequenceState prev_state,
MetaSequenceState state)
{
+ /* PENDING_END state is final */
if (prev_state == META_SEQUENCE_PENDING_END)
return FALSE;
@@ -234,10 +235,6 @@ state_is_applicable (MetaSequenceState prev_state,
if (state == META_SEQUENCE_NONE)
return FALSE;
- /* PENDING_END state is final */
- if (prev_state == META_SEQUENCE_PENDING_END)
- return FALSE;
-
/* Sequences must be accepted/denied before PENDING_END */
if (prev_state == META_SEQUENCE_NONE &&
state == META_SEQUENCE_PENDING_END)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]