diff --git a/src/rx/rx.c b/src/rx/rx.c index cc12815d7a..db1f23a8bc 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -6795,9 +6795,8 @@ update_nextCid(void) { /* Overflow is technically undefined behavior; avoid it. */ if (rx_nextCid > MAX_AFS_INT32 - (1 << RX_CIDSHIFT)) - rx_nextCid = -1 * ((MAX_AFS_INT32 / RX_CIDSHIFT) * RX_CIDSHIFT); - else - rx_nextCid += 1 << RX_CIDSHIFT; + rx_nextCid = 0; + rx_nextCid += 1 << RX_CIDSHIFT; } static void