From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 7487F2B98 for ; Mon, 18 Jul 2016 13:19:39 +0200 (CEST) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 18 Jul 2016 04:19:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,383,1464678000"; d="scan'208";a="141099742" Received: from sie-lab-214-036.ir.intel.com (HELO silpixa00394365.ir.intel.com) ([10.237.214.36]) by fmsmga004.fm.intel.com with ESMTP; 18 Jul 2016 04:19:37 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: Pablo de Lara Date: Mon, 18 Jul 2016 12:20:25 +0100 Message-Id: <1468840825-158116-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] examples/performance-thread: add missing braces X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Jul 2016 11:19:39 -0000 pthread_detach() function was returning 0 even when not calling lthread_detach(), due to missing braces in conditional (extra indentation was applied, giving a hint this is the correct fix). Fixes: 433ba6228f9a ("examples/performance-thread: add pthread_shim app") Signed-off-by: Pablo de Lara --- examples/performance-thread/pthread_shim/pthread_shim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/performance-thread/pthread_shim/pthread_shim.c b/examples/performance-thread/pthread_shim/pthread_shim.c index 93c3216..0d6100c 100644 --- a/examples/performance-thread/pthread_shim/pthread_shim.c +++ b/examples/performance-thread/pthread_shim/pthread_shim.c @@ -417,9 +417,10 @@ int pthread_detach(pthread_t tid) if (override) { struct lthread *lt = (struct lthread *)tid; - if (lt == lthread_current()) + if (lt == lthread_current()) { lthread_detach(); return 0; + } NOT_IMPLEMENTED; } return _sys_pthread_funcs.f_pthread_detach(tid); -- 2.7.4