dpward / rpms / sssd

Forked from rpms/sssd 3 years ago
Clone
Blob Blame History Raw
From 7fcd0a70d6dcaab3aa8f2a84ce9dc939ec350415 Mon Sep 17 00:00:00 2001
From: Tomas Halman <thalman@redhat.com>
Date: Wed, 21 Aug 2019 17:00:44 +0200
Subject: [PATCH] BE: Invalid oprator used in condition
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

There is wrong binary or used in condition. We have to use & here

Related to https://bugzilla.redhat.com/show_bug.cgi?id=1744134

Reviewed-by: Pavel Březina <pbrezina@redhat.com>
---
 src/providers/be_ptask.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/providers/be_ptask.c b/src/providers/be_ptask.c
index 8d75d51d1..319e44aa8 100644
--- a/src/providers/be_ptask.c
+++ b/src/providers/be_ptask.c
@@ -228,13 +228,13 @@ static void be_ptask_schedule(struct be_ptask *task,
         delay = delay + (sss_rand() % task->random_offset);
     }
 
-    if(from | BE_PTASK_SCHEDULE_FROM_NOW) {
+    if(from & BE_PTASK_SCHEDULE_FROM_NOW) {
         tv = tevent_timeval_current_ofs(delay, 0);
 
         DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: scheduling task %lu seconds "
               "from now [%lu]\n", task->name, delay, tv.tv_sec);
     }
-    else if (from | BE_PTASK_SCHEDULE_FROM_LAST) {
+    else if (from & BE_PTASK_SCHEDULE_FROM_LAST) {
         tv = tevent_timeval_set(task->last_execution + delay, 0);
 
         DEBUG(SSSDBG_TRACE_FUNC, "Task [%s]: scheduling task %lu seconds "
-- 
2.20.1