diff options
author | Lukasz Rymanowski <lukasz.rymanowski@tieto.com> | 2014-01-10 02:24:23 +0100 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2014-01-10 17:45:17 +0200 |
commit | d0df2eddd01df69526c65826221c2af41dc800c7 (patch) | |
tree | 034bdd5c80f798a13f17254da4d5ce1441cb2004 /android/hal-ipc.c | |
parent | 3ef04d3093898090290325511f4f78dcfc9db50a (diff) | |
download | bluez-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.c | 6 |
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(¬if_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); |