File bsc#1151007-0004-Refactor-fencer-no-need-to-check-the-length-of-a-non.patch of Package pacemaker.26926

From 4d48cc7b42cbba32b6c5cbdcdff2496fdc77d6b2 Mon Sep 17 00:00:00 2001
From: "Gao,Yan" <ygao@suse.com>
Date: Mon, 14 Oct 2019 14:14:54 +0200
Subject: [PATCH 4/5] Refactor: fencer: no need to check the length of a
 non-empty list for pending fencing actions

"if (device->pending_ops)" is sufficient here. An empty GList* is
guaranteed to be NULL, and a non-empty list non-NULL.
---
 daemons/fenced/fenced_commands.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/daemons/fenced/fenced_commands.c b/daemons/fenced/fenced_commands.c
index 07c45afbc..bbf37754a 100644
--- a/daemons/fenced/fenced_commands.c
+++ b/daemons/fenced/fenced_commands.c
@@ -433,7 +433,7 @@ done:
     /* Device might get triggered to work by multiple fencing commands
      * simultaneously. Trigger the device again to make sure any
      * remaining concurrent commands get executed. */
-    if (device->pending_ops && g_list_length(device->pending_ops) > 0) {
+    if (device->pending_ops) {
         mainloop_set_trigger(device->work);
     }
     return TRUE;
-- 
2.16.4

openSUSE Build Service is sponsored by