This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Harald Welte gerrit-no-reply at lists.osmocom.orgHarald Welte has submitted this change and it was merged. Change subject: Mark input parameter to bitvec_set_bits() as 'const' ...................................................................... Mark input parameter to bitvec_set_bits() as 'const' The input data is accessed in a read-only manner, so it should be marked with the const qualifier. Change-Id: I0d6b86289fa647594f3da1f1c0e0168685307a37 --- M include/osmocom/core/bitvec.h M src/bitvec.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Max: Looks good to me, but someone else must approve Harald Welte: Looks good to me, approved Jenkins Builder: Verified diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index c3c1153..19e2af8 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -70,7 +70,7 @@ enum bit_value bit); int bitvec_set_bit(struct bitvec *bv, enum bit_value bit); int bitvec_get_bit_high(struct bitvec *bv); -int bitvec_set_bits(struct bitvec *bv, enum bit_value *bits, unsigned int count); +int bitvec_set_bits(struct bitvec *bv, const enum bit_value *bits, unsigned int count); int bitvec_set_uint(struct bitvec *bv, uint32_t in, unsigned int count); int bitvec_get_uint(struct bitvec *bv, unsigned int num_bits); int bitvec_find_bit_pos(const struct bitvec *bv, unsigned int n, enum bit_value val); diff --git a/src/bitvec.c b/src/bitvec.c index 88343c4..ef8fd0e 100644 --- a/src/bitvec.c +++ b/src/bitvec.c @@ -198,7 +198,7 @@ * \param[in] bits array of \ref bit_value * \param[in] count number of bits to set * \return 0 on success; negative in case of error */ -int bitvec_set_bits(struct bitvec *bv, enum bit_value *bits, unsigned int count) +int bitvec_set_bits(struct bitvec *bv, const enum bit_value *bits, unsigned int count) { int i, rc; -- To view, visit https://gerrit.osmocom.org/420 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I0d6b86289fa647594f3da1f1c0e0168685307a37 Gerrit-PatchSet: 1 Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Owner: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: Max <msuraev at sysmocom.de>