DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: dev@dpdk.org
Cc: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: [dpdk-dev] [PATCH] examples/performance-thread: add missing braces
Date: Mon, 18 Jul 2016 12:20:25 +0100	[thread overview]
Message-ID: <1468840825-158116-1-git-send-email-pablo.de.lara.guarch@intel.com> (raw)

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 <pablo.de.lara.guarch@intel.com>
---
 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

             reply	other threads:[~2016-07-18 11:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 11:20 Pablo de Lara [this message]
2016-07-18 12:39 ` Mcnamara, John
2016-07-22 10:05   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468840825-158116-1-git-send-email-pablo.de.lara.guarch@intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).