Patch Set 2:

(1 comment)

https://gerrit.osmocom.org/#/c/3990/2/src/bitvec.c
File src/bitvec.c:

Line 513: int bitvec_write_field_lh(struct bitvec *bv, unsigned int 
*write_index, uint64_t val, unsigned int len)
So this function takes an unsigned int and converts it to L/H values which are 
then appended to the bitvector.  We already have bitvec_set_bit() which can 
accept a single 0/1/L/H value, and we have bitvec_set_bits() accepts multiple 
consecutive 0/1/L/H values.  I'm not quite sure if it makes sense to add this 
function, unless we often have integer numbers that must be expressed as L/H 
values.  The two callers in the IA rest octets don't convince me, as the spec 
states HH, and not '3'. Us mentally converting HH to '3' and then adding a 
function to convert back doesn't seem very straight-forward and easy to 
understand, sorry.


-- 
To view, visit https://gerrit.osmocom.org/3990
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I36a76916a5986f098b6be6b5b779639c470725ef
Gerrit-PatchSet: 2
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen <[email protected]>
Gerrit-Reviewer: Harald Welte <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <[email protected]>
Gerrit-HasComments: Yes

Reply via email to