Change in libosmocore[master]: add osmo_bsc2str()

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/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Thu Dec 6 15:11:50 UTC 2018


Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/12153 )

Change subject: add osmo_bsc2str()
......................................................................


Patch Set 2:

(3 comments)

https://gerrit.osmocom.org/#/c/12153/2//COMMIT_MSG
Commit Message:

https://gerrit.osmocom.org/#/c/12153/2//COMMIT_MSG@7
PS2, Line 7: add osmo_bsc2str()
> typo: bcd2str
lol


https://gerrit.osmocom.org/#/c/12153/2/include/osmocom/core/utils.h
File include/osmocom/core/utils.h:

https://gerrit.osmocom.org/#/c/12153/2/include/osmocom/core/utils.h@52
PS2, Line 52: int osmo_bcd2str(char *dst, size_t dst_size, const uint8_t bcd[], int start_nibble, int end_nibble);
> Why using bcd[] instead of *bcd?
not sure really. (You know how you sometimes in a city you walk your favorite route to get somewhere, but when you walk back you take a different route, and can't really explain why?) I guess since it is a fixed const array of bytes made me pick []. But sure, our style is usually different.


https://gerrit.osmocom.org/#/c/12153/2/src/utils.c
File src/utils.c:

https://gerrit.osmocom.org/#/c/12153/2/src/utils.c@143
PS2, Line 143: int osmo_bcd2str(char *dst, size_t dst_size, const uint8_t bcd[], int start_nibble, int end_nibble)
> if it' strlen, then return is a size_t or unsigned int.
hmm, but snprintf() returns int, too.



-- 
To view, visit https://gerrit.osmocom.org/12153
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I86b09d37ceef33331c1a56046a5443127d6c6be0
Gerrit-Change-Number: 12153
Gerrit-PatchSet: 2
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Comment-Date: Thu, 06 Dec 2018 15:11:50 +0000
Gerrit-HasComments: Yes
Gerrit-HasLabels: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181206/0024c7ed/attachment.htm>


More information about the gerrit-log mailing list