Diff between 00929bfb3b85b6bd4b0e080beae3f4a83c27a89c and 68f4b7886317f7731f89b3bfda6e014f7e5b03f4

Changed Files

File Additions Deletions Status
android/android-tester.c +3 -3 modified

Full Patch

diff --git a/android/android-tester.c b/android/android-tester.c
index 25b0444..d1086df 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -1199,7 +1199,7 @@ static void test_generic_listen(const void *test_data)
 	}
 
 	/* Check that file descriptor is valid */
-	if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) == -1) {
+	if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) < 0) {
 		tester_test_failed();
 		return;
 	}
@@ -1332,7 +1332,7 @@ static void test_generic_connect(const void *test_data)
 	}
 
 	/* Check that file descriptor is valid */
-	if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) == -1) {
+	if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) < 0) {
 		tester_test_failed();
 		return;
 	}
@@ -1467,7 +1467,7 @@ static void test_socket_real_connect(const void *test_data)
 	}
 
 	/* Check that file descriptor is valid */
-	if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) == -1) {
+	if (status == BT_STATUS_SUCCESS && fcntl(sock_fd, F_GETFD) < 0) {
 		tester_test_failed();
 		return;
 	}