Diff between 3ef04d3093898090290325511f4f78dcfc9db50a and d0df2eddd01df69526c65826221c2af41dc800c7

Changed Files

File Additions Deletions Status
android/hal-audio.c +2 -2 modified
android/hal-ipc.c +3 -3 modified

Full Patch

diff --git a/android/hal-audio.c b/android/hal-audio.c
index 01d8ebf..421832a 100644
--- a/android/hal-audio.c
+++ b/android/hal-audio.c
@@ -547,10 +547,10 @@ static int audio_open(const hw_module_t *module, const char *name,
 	*device = &a2dp_dev->dev.common;
 
 	err = pthread_create(&ipc_th, NULL, ipc_handler, NULL);
-	if (err < 0) {
+	if (err) {
 		ipc_th = 0;
 		error("audio: Failed to start Audio IPC thread: %d (%s)",
-							-err, strerror(-err));
+							err, strerror(err));
 		return (-err);
 	}
 
diff --git a/android/hal-ipc.c b/android/hal-ipc.c
index b19704a..97f1bcd 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);