[PATCH 3/3] attrib: Remove norequests and noresponses variables

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

 



Using g_queue_is_empty() directly in if condition looks more
readable.
---
 attrib/gattrib.c |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/attrib/gattrib.c b/attrib/gattrib.c
index 0090027..37581a3 100644
--- a/attrib/gattrib.c
+++ b/attrib/gattrib.c
@@ -394,7 +394,6 @@ static gboolean received_data(GIOChannel *io, GIOCondition cond, gpointer data)
 	uint8_t buf[512], status;
 	gsize len;
 	GIOStatus iostat;
-	gboolean norequests, noresponses;
 
 	if (attrib->stale)
 		return FALSE;
@@ -447,10 +446,8 @@ static gboolean received_data(GIOChannel *io, GIOCondition cond, gpointer data)
 	status = 0;
 
 done:
-	norequests = g_queue_is_empty(attrib->requests);
-	noresponses = g_queue_is_empty(attrib->responses);
-
-	if (!norequests || !noresponses)
+	if (!g_queue_is_empty(attrib->requests) ||
+					!g_queue_is_empty(attrib->responses))
 		wake_up_sender(attrib);
 
 	if (cmd) {
-- 
1.7.9.5

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