<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Sorry, but I don't think it makes sense to introduce a new symbol.<br>Why not to introduce something like: GSM_BAND_NONE or<br>GSM_BAND_INVAL (0x00)?<br></p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">I already thought about this possibility first, but decided to do it this way finally.<br>Because then all code using switch() statements on enum gsm_band will start failing and will break several repositories, and need to check for default value or that specific enum value in lots of places were really doesn't make sense since it should not happen (as in you expect a valid band). So really having to change lots of places which expect a valid band to fix a single place were unknown band can be returned makes no sense to me.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">Moreover, you're changing the logic of old gsm_arfcn2band()<br>anyway...</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">You are changing the logic of osmo_arfcn2band too by doing it the way you say, so no real change here.</p><p style="white-space: pre-wrap; word-wrap: break-word;">It's still not changing the API I'd argue, because I'd say passing an invalid arfcn was not contemplated for this API, since obviously makes no sense to return DCS1800 in that case. So this commit actually makes the API more concrete for some corner cases which used to be "undefined behaviour".</p><p><a href="https://gerrit.osmocom.org/11789">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11789">change 11789</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/11789"/><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: I780d452dcebce385469e32ef2fd844df6033393a </div>
<div style="display:none"> Gerrit-Change-Number: 11789 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 16 Nov 2018 14:45:14 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-HasLabels: No </div>