On Thu, Jan 20, 2022 at 07:02:43PM +0000, Miod Vallat wrote: > > An unsinged TF_TIMER does not create that problem. > > Why don't you simply append an U suffix to TF_TMR_REXMT?
There are a lot of TF_ flags. Ususally we dont put an U to hex flags. The only one that is used for shifting is TF_TMR_REXMT after going through the TF_TIMER define. So I thought the cast there is most specific. Alternatives are: - put U to every TF_ TCP flag - put U to all TF_TMR_ timer flags - put U to TF_TMR_REXMT retransmit timer flag - cast TF_TIMER to unsigned (what I did) - cast to unsigned in the TCP_TIMER_ARM, TCP_TIMER_ARM_MSEC, TCP_TIMER_DISARM, TCP_TIMER_ISARMED macros where the shift happens. There is no best, minimalistic and most consistent solution. bluhm
