summaryrefslogtreecommitdiff
path: root/net/irda/irlap_frame.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2005-07-09 01:57:23 +0400
committerDavid S. Miller <davem@davemloft.net>2005-07-09 01:57:23 +0400
commitb03efcfb2180289718991bb984044ce6c5b7d1b0 (patch)
treef3b0c6c4eaf0991c28b7116a20994b48398eea57 /net/irda/irlap_frame.c
parenta92b7b80579fe68fe229892815c750f6652eb6a9 (diff)
downloadlinux-b03efcfb2180289718991bb984044ce6c5b7d1b0.tar.xz
[NET]: Transform skb_queue_len() binary tests into skb_queue_empty()
This is part of the grand scheme to eliminate the qlen member of skb_queue_head, and subsequently remove the 'list' member of sk_buff. Most users of skb_queue_len() want to know if the queue is empty or not, and that's trivially done with skb_queue_empty() which doesn't use the skb_queue_head->qlen member and instead uses the queue list emptyness as the test. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/irda/irlap_frame.c')
-rw-r--r--net/irda/irlap_frame.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 040abe714aa3..6dafbb43b529 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -1018,11 +1018,10 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
/*
* We can now fill the window with additional data frames
*/
- while (skb_queue_len( &self->txq) > 0) {
+ while (!skb_queue_empty(&self->txq)) {
IRDA_DEBUG(0, "%s(), sending additional frames!\n", __FUNCTION__);
- if ((skb_queue_len( &self->txq) > 0) &&
- (self->window > 0)) {
+ if (self->window > 0) {
skb = skb_dequeue( &self->txq);
IRDA_ASSERT(skb != NULL, return;);
@@ -1031,8 +1030,7 @@ void irlap_resend_rejected_frames(struct irlap_cb *self, int command)
* bit cleared
*/
if ((self->window > 1) &&
- skb_queue_len(&self->txq) > 0)
- {
+ !skb_queue_empty(&self->txq)) {
irlap_send_data_primary(self, skb);
} else {
irlap_send_data_primary_poll(self, skb);