tcp_seg(s)_free: remove return value, noone uses it

This commit is contained in:
goldsimon 2010-02-16 17:20:10 +00:00
parent 5b221ecd4f
commit c637441f52
2 changed files with 7 additions and 15 deletions

View File

@ -862,42 +862,34 @@ tcp_fasttmr(void)
* Deallocates a list of TCP segments (tcp_seg structures).
*
* @param seg tcp_seg list of TCP segments to free
* @return the number of pbufs that were deallocated
*/
u8_t
void
tcp_segs_free(struct tcp_seg *seg)
{
u8_t count = 0;
struct tcp_seg *next;
while (seg != NULL) {
next = seg->next;
count += tcp_seg_free(seg);
struct tcp_seg *next = seg->next;
tcp_seg_free(seg);
seg = next;
}
return count;
}
/**
* Frees a TCP segment (tcp_seg structure).
*
* @param seg single tcp_seg to free
* @return the number of pbufs that were deallocated
*/
u8_t
void
tcp_seg_free(struct tcp_seg *seg)
{
u8_t count = 0;
if (seg != NULL) {
if (seg->p != NULL) {
count = pbuf_free(seg->p);
pbuf_free(seg->p);
#if TCP_DEBUG
seg->p = NULL;
#endif /* TCP_DEBUG */
}
memp_free(MEMP_TCP_SEG, seg);
}
return count;
}
/**

View File

@ -579,8 +579,8 @@ struct tcp_pcb *tcp_pcb_copy(struct tcp_pcb *pcb);
void tcp_pcb_purge(struct tcp_pcb *pcb);
void tcp_pcb_remove(struct tcp_pcb **pcblist, struct tcp_pcb *pcb);
u8_t tcp_segs_free(struct tcp_seg *seg);
u8_t tcp_seg_free(struct tcp_seg *seg);
void tcp_segs_free(struct tcp_seg *seg);
void tcp_seg_free(struct tcp_seg *seg);
struct tcp_seg *tcp_seg_copy(struct tcp_seg *seg);
#define tcp_ack(pcb) \