<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">_buf changes</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">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.</p><p style="white-space: pre-wrap; word-wrap: break-word;">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():</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  OSMO_STRBUF_PRINTF(sb, "%s", osmo_gsm48_classmark_a5_name_buf(...));</pre><p style="white-space: pre-wrap; word-wrap: break-word;">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().</p><p><a href="https://gerrit.osmocom.org/13573">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13573">change 13573</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/13573"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Id748b906b0083b1f1887f2be7a53cae705a8a9ae </div>
<div style="display:none"> Gerrit-Change-Number: 13573 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 11 Apr 2019 01:24:58 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>