<p>Neels Hofmeyr <strong>uploaded patch set #2</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/12671">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add osmo_hexdump_b(), osmo_hexdump_nospc_b()<br><br>Add osmo_hexdump_b() and osmo_hexdump_nospc_b() to use a second static buffer,<br>allowing more than one hexdump per printf()-like call.<br><br>Rationale: recently during patch review, a situation came up where two hexdumps<br>in a single printf would have been useful. Now I've faced a similar situation<br>again, in ongoing development. So I decided it is time to provide this API.<br><br>Naming: before, I named functions that use a secondary string buffer with a '2'<br>suffix, like osmo_plmn_name() and osmo_plmn_name2(). This time, I decided to<br>use a '_b' suffix, osmo_hexdump_b(), instead. The reason is, by now I think<br>that '2' is a bad choice for secondary-buffer functions: the '2' suffix is<br>already used for introducing a newer API version of function signatures. If we,<br>for example, introduce an osmo_hexdump() that has no final delimiter after the<br>last byte, that would qualify for osmo_hexdump2(); and that would confuse with<br>the implementation simply using a secondary buffer. Sometimes during code<br>review, I assume that the existence of a foo2() function means the patch<br>submitter should use foo2() instead of foo(), and am annoyed by my previous<br>choice of overloading the '2' suffix with a secondary meaning besides "this is<br>newer API".<br><br>Change-Id: Ia48fc6b984f06b972a6846b173b8cf8d30737460<br>---<br>M include/osmocom/core/utils.h<br>M src/utils.c<br>2 files changed, 25 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/71/12671/2</pre><p>To view, visit <a href="https://gerrit.osmocom.org/12671">change 12671</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/12671"/><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: newpatchset </div>
<div style="display:none"> Gerrit-Change-Id: Ia48fc6b984f06b972a6846b173b8cf8d30737460 </div>
<div style="display:none"> Gerrit-Change-Number: 12671 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </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>