DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] examples/performance-thread: add missing braces
@ 2016-07-18 11:20 Pablo de Lara
  2016-07-18 12:39 ` Mcnamara, John
  0 siblings, 1 reply; 3+ messages in thread
From: Pablo de Lara @ 2016-07-18 11:20 UTC (permalink / raw)
  To: dev; +Cc: Pablo de Lara

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/performance-thread: add missing braces
  2016-07-18 11:20 [dpdk-dev] [PATCH] examples/performance-thread: add missing braces Pablo de Lara
@ 2016-07-18 12:39 ` Mcnamara, John
  2016-07-22 10:05   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Mcnamara, John @ 2016-07-18 12:39 UTC (permalink / raw)
  To: De Lara Guarch, Pablo, dev; +Cc: De Lara Guarch, Pablo

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> Sent: Monday, July 18, 2016 12:20 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>
> Subject: [dpdk-dev] [PATCH] examples/performance-thread: add missing
> braces
> 
> 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>

Tested-by: John McNamara <john.mcnamara@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] examples/performance-thread: add missing braces
  2016-07-18 12:39 ` Mcnamara, John
@ 2016-07-22 10:05   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2016-07-22 10:05 UTC (permalink / raw)
  To: De Lara Guarch, Pablo; +Cc: dev, Mcnamara, John

2016-07-18 12:39, Mcnamara, John:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Pablo de Lara
> > 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>
> 
> Tested-by: John McNamara <john.mcnamara@intel.com>
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-07-22 10:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-18 11:20 [dpdk-dev] [PATCH] examples/performance-thread: add missing braces Pablo de Lara
2016-07-18 12:39 ` Mcnamara, John
2016-07-22 10:05   ` Thomas Monjalon

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).