From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 21884A2EFC for ; Tue, 17 Sep 2019 09:58:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AD8581BFBB; Tue, 17 Sep 2019 09:58:04 +0200 (CEST) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id CC0101BFAA for ; Tue, 17 Sep 2019 09:57:58 +0200 (CEST) Received: by mail-lf1-f67.google.com with SMTP id x80so2096413lff.3 for ; Tue, 17 Sep 2019 00:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NmBqw+BMLzZ/8Flgo8FLKyEvK1Io2QD3hAZums/97J4=; b=KAp/xaiXcxeQ4EAJV8qJJOPt9R9dZiuKLTGoAqcgoBP+IElfdnhbLSDITAzk2Yec+B WN8lov6qY83LHA91LH2oBxgnJStfqUr98SLlB3GB4MC+c/t8YFJPa9Wn4ji2FemFd+WL FJyLzGFO7bEFm4HRk8CLjTf5+7wc8v7Ns+EJ7y4NK0dHI6dIHCslpOEzoDBGL0MPTdRQ O8YqXdXV8TKm7+dK9L3Mj1qG6GZzliNdpJSY8hFFM5POrpempBYI2fLKelp6E66VDI3J 7v6wDMGUJCD/3amhxvM+fR5drs07WTPhIMMxiXsncgTFUgzEimIo6kvrHbfLKt7ZCngs 51mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NmBqw+BMLzZ/8Flgo8FLKyEvK1Io2QD3hAZums/97J4=; b=ps3fs9gCpPyLay5kB2nDUlZj++tPF1paWW5ttBY30yk6gkLxCkeMsREwwUCybaQ9CL 5McOXd+6bkWjTgLVWDi2+dTFZVZM/GYhrVKUxpYfyROrt5OzausWV61KzEDf5k65CsA6 n9YeET5zmzRtZFsDUcQAzMaikmYzCWhtxzG0z48qzStwyHsu4VCJca9Dkd5f2EtS92IY 3T3SyLt7jumCMFXsdfGxCcuTRAeqX+xY9FmOUPHO5U+U4GPoA4UmTPrO9MghGz+ty+xD rPYSymjA2isHqSffNElHCxa6gTTMwBTO7CAYzZBXNBkDz3WadrJoJ23AVSuR2L+Iqq32 h4NA== X-Gm-Message-State: APjAAAUiVqtU8pfyuP7/k8qJ+qyYxJOEt8MlG8h/Pan4gyqGYBMegk4W t5GQmco8KAvjCJblX0+yeF9H0infqII= X-Google-Smtp-Source: APXvYqzhy8MpENhfpmvK1w41MKCALyuYq44VyrHicVDbxs4bvecXJ6Efg3q5CyKTlweJ5YM46iAlvg== X-Received: by 2002:ac2:5101:: with SMTP id q1mr1300926lfb.13.1568707078067; Tue, 17 Sep 2019 00:57:58 -0700 (PDT) Received: from localhost.localdomain (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.googlemail.com with ESMTPSA id g1sm270659ljl.31.2019.09.17.00.57.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2019 00:57:57 -0700 (PDT) From: Andrzej Ostruszka To: dev@dpdk.org, Erik Gabriel Carrillo , Jerin Jacob Cc: mattias.ronnblom@ericsson.com, stephen@networkplumber.org, Andrzej Ostruszka Date: Tue, 17 Sep 2019 09:57:46 +0200 Message-Id: <20190917075754.8310-3-amo@semihalf.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190917075754.8310-1-amo@semihalf.com> References: <20190917075754.8310-1-amo@semihalf.com> Subject: [dpdk-dev] [PATCH v2 02/10] eventdev: fix possible use of uninitialized var X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fix the logic for the case of event queue allowing all schedule types. Signed-off-by: Andrzej Ostruszka --- lib/librte_eventdev/rte_event_timer_adapter.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/librte_eventdev/rte_event_timer_adapter.c b/lib/librte_eventdev/rte_event_timer_adapter.c index 5ce399eca..161e21a68 100644 --- a/lib/librte_eventdev/rte_event_timer_adapter.c +++ b/lib/librte_eventdev/rte_event_timer_adapter.c @@ -706,11 +706,11 @@ check_destination_event_queue(struct rte_event_timer *evtim, RTE_EVENT_QUEUE_ATTR_SCHEDULE_TYPE, &sched_type); - if ((ret < 0 && ret != -EOVERFLOW) || - evtim->ev.sched_type != sched_type) - return -1; + if ((ret == 0 && evtim->ev.sched_type == sched_type) || + ret == -EOVERFLOW) + return 0; - return 0; + return -1; } static int -- 2.17.1