<p>Neels Hofmeyr <strong>uploaded patch set #6</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/12658">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add osmo_hexdump_buf() and test<br><br>Add osmo_hexdump_buf() as an all-purpose hexdump function, which all other<br>osmo_hexdump_*() implementations now call. It absorbs the static<br>_osmo_hexdump(). Add tests for osmo_hexdump_buf().<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>The traditional osmo_hexdump() API returns a non-const char*, which should<br>probably have been a const instead. Particularly this new function may return a<br>string constant "" if the buf is NULL or empty, so return const char*. That is<br>why the older implementations calling osmo_hexdump_buf() separately return the<br>buffer instead of the const return value directly.<br><br>Change-Id: I590595567b218b24e53c9eb1fd8736c0324d371d<br>---<br>M include/osmocom/core/utils.h<br>M src/utils.c<br>M tests/utils/utils_test.c<br>M tests/utils/utils_test.ok<br>4 files changed, 163 insertions(+), 11 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/58/12658/6</pre><p>To view, visit <a href="https://gerrit.osmocom.org/12658">change 12658</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/12658"/><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: I590595567b218b24e53c9eb1fd8736c0324d371d </div>
<div style="display:none"> Gerrit-Change-Number: 12658 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>