Attention is currently required from: laforge, pespin. neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmo-sccp/+/32320 )
Change subject: sccp_scoc.c: fix infinite loop on conn ID exhaustion ...................................................................... Patch Set 3: (2 comments) File src/sccp_scoc.c: https://gerrit.osmocom.org/c/libosmo-sccp/+/32320/comment/0cebe39f_ca2b74bb PS3, Line 549: int max_attempts = 0x00FFFFFE; > this would better be an unsigned, but fine anyway. there is a 'while (max_attempts > 0)' below, so I'd rather use an unsigned value -- it's not really needed here, sure, but when there's subtraction and comparison, it's just generally saner to use a signed type. If a bug would accidentally 'max_attempts--' too often, an unsigned type could make that an infinite loop. A signed type would still exit. https://gerrit.osmocom.org/c/libosmo-sccp/+/32320/comment/6606ee89_423886a1 PS3, Line 562: while ((max_attempts--) > 0) { > OSMO_LIKELY(), but not critical. i'm only starting to get a handle on the LIKELY and UNLIKELY stuff... so you mean like this? <points at next patch set> -- To view, visit https://gerrit.osmocom.org/c/libosmo-sccp/+/32320 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmo-sccp Gerrit-Branch: master Gerrit-Change-Id: Ib64e0cb1ae0cc8b7bebcb2a352d4068b496b304a Gerrit-Change-Number: 32320 Gerrit-PatchSet: 3 Gerrit-Owner: neels <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: pespin <[email protected]> Gerrit-Attention: laforge <[email protected]> Gerrit-Attention: pespin <[email protected]> Gerrit-Comment-Date: Wed, 10 May 2023 00:15:10 +0000 Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: pespin <[email protected]> Gerrit-MessageType: comment
