summaryrefslogtreecommitdiff
path: root/android/hal-ipc.c
diff options
context:
space:
mode:
authorLukasz Rymanowski <lukasz.rymanowski@tieto.com>2014-01-10 02:24:23 +0100
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-01-10 17:45:17 +0200
commitd0df2eddd01df69526c65826221c2af41dc800c7 (patch)
tree034bdd5c80f798a13f17254da4d5ce1441cb2004 /android/hal-ipc.c
parent3ef04d3093898090290325511f4f78dcfc9db50a (diff)
downloadbluez-d0df2eddd01df69526c65826221c2af41dc800c7.tar.gz
android: Fix error check from pthread_create
pthread_create() returns 0 on success or errno code which is non negative number
Diffstat (limited to 'android/hal-ipc.c')
-rw-r--r--android/hal-ipc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index b19704aa8..97f1bcd92 100644
--- a/android/hal-ipc.c
+++ b/android/hal-ipc.c
@@ -284,10 +284,10 @@ bool hal_ipc_init(void)
close(sk);
err = pthread_create(&notif_th, NULL, notification_handler, NULL);
- if (err < 0) {
+ if (err) {
notif_th = 0;
- error("Failed to start notification thread: %d (%s)", -err,
- strerror(-err));
+ error("Failed to start notification thread: %d (%s)", err,
+ strerror(err));
close(cmd_sk);
cmd_sk = -1;
close(notif_sk);