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

Change subject: add osmo_{escape,quote}_str_buf2() for OSMO_STRBUF_APPEND() use
......................................................................


Patch Set 1:

> _buf changes

We've recently added the OSMO_STRBUF_APPEND() macro, which works well with 
function signatures like snprintf(), i.e. first arguments are buf and len, and 
it returns an *int* len of characters that would have been written.

The _buf functions generally return a char* to be useful for printf formats. 
They can't be used with OSMO_STRBUF_APPEND() directly because that requires the 
int return val. However, they *can* be used with OSMO_STRBUF_PRINTF():

  OSMO_STRBUF_PRINTF(sb, "%s", osmo_gsm48_classmark_a5_name_buf(...));

So, this patch should probably not bother to introduce _buf functions that 
adhere to the snprintf() signature. It is fine to return a char* and use those 
with OSMO_STRBUF_PRINTF().


--
To view, visit https://gerrit.osmocom.org/13573
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: Id748b906b0083b1f1887f2be7a53cae705a8a9ae
Gerrit-Change-Number: 13573
Gerrit-PatchSet: 1
Gerrit-Owner: Neels Hofmeyr <[email protected]>
Gerrit-Reviewer: Jenkins Builder (1000002)
Gerrit-Reviewer: Neels Hofmeyr <[email protected]>
Gerrit-CC: Harald Welte <[email protected]>
Gerrit-Comment-Date: Thu, 11 Apr 2019 01:24:58 +0000
Gerrit-HasComments: No
Gerrit-HasLabels: No

Reply via email to