[PATCH] unit/gatt: Fix using possible negative return value

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

 



From: Andrei Emeltchenko <andrei.emeltchenko@xxxxxxxxx>

---
 unit/test-gatt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/unit/test-gatt.c b/unit/test-gatt.c
index 703430c..af38e9f 100644
--- a/unit/test-gatt.c
+++ b/unit/test-gatt.c
@@ -648,11 +648,11 @@ static void test_server(gconstpointer data)
 
 	len = write(context->fd, pdu.data, pdu.size);
 
+	g_assert_cmpint(len, ==, pdu.size);
+
 	if (g_test_verbose())
 		util_hexdump('<', pdu.data, len, test_debug, "GATT: ");
 
-	g_assert_cmpint(len, ==, pdu.size);
-
 	execute_context(context);
 }
 
-- 
1.9.1

--
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