[PATCH 2/3] android/tester: Make code consistent using < 0 comparison

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

---
 android/android-tester.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/android/android-tester.c b/android/android-tester.c
index fb95dd2..4148c0e 100644
--- a/android/android-tester.c
+++ b/android/android-tester.c
@@ -1194,7 +1194,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;
 	}
@@ -1327,7 +1327,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;
 	}
@@ -1462,7 +1462,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;
 	}
-- 
1.8.3.2

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux