<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">You could pick a different error code, like -ENOBUF if parsing failed, or -EINVAL if value is not in osmocom defined range.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">ERANGE is the matching code for surpassing the range.<br>strtoll() also returns EINVAL in some cases.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Is it really such a problem to pass a positive errno?<br>It guarantees that there is no overlap between strtoll() and self made rc.<br>Most callers will just do 'if (osmo_str_to_int(..)) return ERR;'</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/25345">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/25345">change 25345</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/c/libosmocore/+/25345"/><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-Change-Id: I4dac826aab00bc1780a5258b6b55d34ce7d50c60 </div>
<div style="display:none"> Gerrit-Change-Number: 25345 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: neels <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Tue, 07 Sep 2021 17:16:43 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>