// Compare position even when wrapped around | // Compare position even when wrapped around | ||||
static inline bool isAfter(unsigned a, unsigned b) { | static inline bool isAfter(unsigned a, unsigned b) { | ||||
return (int)a - (int)b > 0; | |||||
return a != b && a - b <= UINT_MAX / 2; | |||||
} | } | ||||
static LogWriter vlog("Congestion"); | static LogWriter vlog("Congestion"); |