[mutter/wip/carlosg/coverity-fixes: 1/13] core: Drop repeated early return condition in function
- From: Carlos Garnacho <carlosg 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: Mon, 25 Oct 2021 09:17:23 +0000 (UTC)
commit 05a7c4dd9e02bf2fe3ae9b9274a9719d4cbd41a9
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
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]