laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/14577 )
Change subject: bitvec: bitvec_get_uint() should return an unsigned int ...................................................................... Patch Set 2: Code-Review-1 as the (likey?) orignal author of the code, I would say the function does exactly what it is supposed to do: parse input as unsigned integer and return it, just as long as it is below the maximum of a signed integer. return negative in case of error. If there is anything to change, then it could be bounds checking, i.e. ASSERT that the caller doesn't pass num_bits leading to potential overflows of INT_MAX. -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/14577 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: I2d50d375ccf63ecb45061682ede0b46b6087d11a Gerrit-Change-Number: 14577 Gerrit-PatchSet: 2 Gerrit-Owner: lynxis lazus <[email protected]> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <[email protected]> Gerrit-Reviewer: laforge <[email protected]> Gerrit-Reviewer: lynxis lazus <[email protected]> Gerrit-Comment-Date: Tue, 16 Jul 2019 04:05:26 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
