[PATCH 8/9] DCCP: Refactor loss initialisation

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

 



dccp_li_hist_interval_new doesn't need the last two parameters as the logic
doesn't belong there and makes dccp_li_update_li more confusing as to where
the structure values come from.

And of course it never hurts to reduce stack usage.

Signed-off-by: Ian McDonald <ian.mcdonald@xxxxxxxxxxx>
Signed-off-by: Gerrit Renker <gerrit@xxxxxxxxxxxxxx>
---
diff --git a/net/dccp/ccids/lib/loss_interval.c b/net/dccp/ccids/lib/loss_interval.c
index 9e7fbed..2001dd7 100644
--- a/net/dccp/ccids/lib/loss_interval.c
+++ b/net/dccp/ccids/lib/loss_interval.c
@@ -150,8 +150,6 @@ static int dccp_li_hist_interval_new(struct list_head *list,
 		list_add(&entry->dccplih_node, list);
 	}
 
-	entry->dccplih_seqno     = seq_nonloss;
-	entry->dccplih_win_count = win_nonloss;
 	return 1;
 }
 
@@ -272,6 +270,8 @@ void dccp_li_update_li(struct sock *sk)
 		head = list_entry(hcrx->ccid3hcrx_li_hist.next,
 		   struct dccp_li_hist_entry, dccplih_node);
 		head->dccplih_interval = dccp_li_calc_first_li(sk);
+		head->dccplih_seqno     = seq_nonloss;
+		head->dccplih_win_count = win_nonloss;
 	} else {
 		struct dccp_li_hist_entry *entry;
 		struct list_head *tail;
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux