<p>Neels Hofmeyr <strong>uploaded patch set #3</strong> to this change.</p><p><a href="https://gerrit.osmocom.org/10830">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">add osmo_str_tolower() and _toupper() with test<br><br>We already have osmo_str2lower() and osmo_str2upper(), but these lack:<br>* proper destination buffer bounds checking,<br>* ability to call directly as printf() argument.<br><br>Deprecate osmo_str2upper() and osmo_str2lower() because of missing bounds<br>checking.<br><br>Introduce osmo_str_tolower_buf(), osmo_str_toupper_buf() to provide<br>bounds-safe conversion, also able to safely convert a buffer in-place.<br><br>Introduce osmo_str_tolower(), osmo_str_toupper() that call the above _buf()<br>equivalents using a static buffer[128] and returning the resulting string<br>directly, convenient for direct printing. Possibly truncated but always safe.<br><br>Add unit tests to utils_test.c.<br><br>Replace all libosmocore uses of now deprecated osmo_str2lower().<br><br>Naming: the ctype.h API is called tolower() and toupper(), so just prepend<br>'osmo_str_' and don't separate 'to_lower'.<br><br>Change-Id: Ib0ee1206b9f31d7ba25c31f8008119ac55440797<br>---<br>M include/osmocom/core/utils.h<br>M src/utils.c<br>M src/vty/logging_vty.c<br>M tests/utils/utils_test.c<br>M tests/utils/utils_test.ok<br>5 files changed, 333 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/30/10830/3</pre><p>To view, visit <a href="https://gerrit.osmocom.org/10830">change 10830</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/10830"/><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: Ib0ee1206b9f31d7ba25c31f8008119ac55440797 </div>
<div style="display:none"> Gerrit-Change-Number: 10830 </div>
<div style="display:none"> Gerrit-PatchSet: 3 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>