Attention is currently required from: laforge, neels.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35207?usp=email )
Change subject: util: add osmo_strbuf macros to manipulate the strbuf tail ......................................................................
Patch Set 2:
(2 comments)
File include/osmocom/core/utils.h:
https://gerrit.osmocom.org/c/libosmocore/+/35207/comment/c6957fd3_c746d24b PS2, Line 288: #define OSMO_STRBUF_CHAR_COUNT(STRBUF) ((STRBUF).buf && (STRBUF).pos > (STRBUF).buf ? \ I would really welcome some extra formatting (lines) and more parenthesis to make this readable at all, as well as having clear understanding of the operation priorities.
File src/core/utils.c:
https://gerrit.osmocom.org/c/libosmocore/+/35207/comment/7472d0e4_8bde82fc PS2, Line 1238: if (!sb->pos) how is it is possible that if n_chars were written to sb->pos, sb->pos is null? This makes no sense to me?