[evolution/gnome-3-28] Bug 795106 - Compiler warnings about identical inner 'if' condition
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-28] Bug 795106 - Compiler warnings about identical inner 'if' condition
- Date: Tue, 10 Apr 2018 13:16:42 +0000 (UTC)
commit f794f8431b3e3708c974f14c7c8d36fdc4318296
Author: Milan Crha <mcrha redhat com>
Date: Tue Apr 10 15:16:33 2018 +0200
Bug 795106 - Compiler warnings about identical inner 'if' condition
src/e-util/e-table-header-item.c | 10 +++-------
src/e-util/e-tree.c | 9 +++++----
2 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/e-util/e-table-header-item.c b/src/e-util/e-table-header-item.c
index 4d09e61..ddf129e 100644
--- a/src/e-util/e-table-header-item.c
+++ b/src/e-util/e-table-header-item.c
@@ -585,15 +585,11 @@ do_drag_motion (ETableHeaderItem *ethi,
col = ethi_find_col_by_x_nearest (ethi, x);
suggested_action = gdk_drag_context_get_suggested_action (context);
- if (ethi->drag_col != -1 && (col == ethi->drag_col ||
- col == ethi->drag_col + 1)) {
- if (ethi->drag_col != -1)
- ethi_remove_destroy_marker (ethi);
-
+ if (ethi->drag_col != -1 && (col == ethi->drag_col || col == ethi->drag_col + 1)) {
+ ethi_remove_destroy_marker (ethi);
ethi_remove_drop_marker (ethi);
gdk_drag_status (context, suggested_action, time);
- }
- else if (col != -1) {
+ } else if (col != -1) {
if (ethi->drag_col != -1)
ethi_remove_destroy_marker (ethi);
diff --git a/src/e-util/e-tree.c b/src/e-util/e-tree.c
index da36727..b83a83b 100644
--- a/src/e-util/e-tree.c
+++ b/src/e-util/e-tree.c
@@ -1813,10 +1813,11 @@ et_foreach_recurse (ETreeModel *model,
callback (path, closure);
- child = e_tree_model_node_get_first_child (E_TREE_MODEL (model), path);
- for (; child; child = e_tree_model_node_get_next (E_TREE_MODEL (model), child))
- if (child)
- et_foreach_recurse (model, child, callback, closure);
+ for (child = e_tree_model_node_get_first_child (E_TREE_MODEL (model), path);
+ child;
+ child = e_tree_model_node_get_next (E_TREE_MODEL (model), child)) {
+ et_foreach_recurse (model, child, callback, closure);
+ }
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]