From e49af08f5b89b3f922948570eab161763f339185 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 22 Jan 2016 16:46:56 +0100 Subject: bitvec: Fix interface to consistently use unsigned int Use unsigned int for the length throughout the interface. We will never have a a negative length. Sponsored-by: On-Waves ehf --- include/osmocom/core/bitvec.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/osmocom/core') diff --git a/include/osmocom/core/bitvec.h b/include/osmocom/core/bitvec.h index 89eb7848..2415a814 100644 --- a/include/osmocom/core/bitvec.h +++ b/include/osmocom/core/bitvec.h @@ -66,12 +66,12 @@ int bitvec_set_bit_pos(struct bitvec *bv, unsigned int bitnum, 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, int count); -int bitvec_set_uint(struct bitvec *bv, unsigned int in, int count); -int bitvec_get_uint(struct bitvec *bv, int num_bits); +int bitvec_set_bits(struct bitvec *bv, 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); int bitvec_spare_padding(struct bitvec *bv, unsigned int up_to_bit); -int bitvec_get_bytes(struct bitvec *bv, uint8_t *bytes, int count); -int bitvec_set_bytes(struct bitvec *bv, const uint8_t *bytes, int count); +int bitvec_get_bytes(struct bitvec *bv, uint8_t *bytes, unsigned int count); +int bitvec_set_bytes(struct bitvec *bv, const uint8_t *bytes, unsigned int count); /*! @} */ -- cgit v1.2.3