summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPablo de Lara <pablo.de.lara.guarch@intel.com>2016-07-18 12:20:25 +0100
committerThomas Monjalon <thomas.monjalon@6wind.com>2016-07-22 12:40:26 +0200
commit9a9751b58bd608f9d4d5f0df2b0e96c43ae44bfb (patch)
tree806140aecfcbbad76542c2609701bd739a19852f /examples
parent56c9ff8e3e53bb69c3b0b59454b313e075e2fab4 (diff)
downloaddpdk-9a9751b58bd608f9d4d5f0df2b0e96c43ae44bfb.zip
dpdk-9a9751b58bd608f9d4d5f0df2b0e96c43ae44bfb.tar.gz
dpdk-9a9751b58bd608f9d4d5f0df2b0e96c43ae44bfb.tar.xz
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>
Diffstat (limited to 'examples')
-rw-r--r--examples/performance-thread/pthread_shim/pthread_shim.c3
1 files changed, 2 insertions, 1 deletions
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);