mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
gnrc_tcp: abs() -> labs() for int32_t
Fixes compilation on msp430 and probably avr.
This commit is contained in:
parent
5dd24e12bf
commit
acd47f0c1f
@ -455,7 +455,7 @@ int _pkt_acknowledge(gnrc_tcp_tcb_t *tcb, const uint32_t ack)
|
||||
/* If this is a subsequent sample */
|
||||
else {
|
||||
tcb->rtt_var = (tcb->rtt_var / CONFIG_GNRC_TCP_RTO_B_DIV) * (CONFIG_GNRC_TCP_RTO_B_DIV-1);
|
||||
tcb->rtt_var += abs(tcb->srtt - rtt) / CONFIG_GNRC_TCP_RTO_B_DIV;
|
||||
tcb->rtt_var += labs(tcb->srtt - rtt) / CONFIG_GNRC_TCP_RTO_B_DIV;
|
||||
tcb->srtt = (tcb->srtt / CONFIG_GNRC_TCP_RTO_A_DIV) * (CONFIG_GNRC_TCP_RTO_A_DIV-1);
|
||||
tcb->srtt += rtt / CONFIG_GNRC_TCP_RTO_A_DIV;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user