<p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #d4ffd4;">Code-Review +1</span></p><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25659">View Change</a></p><p>3 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25659/2/include/osmocom/bsc/gsm_data.h">File include/osmocom/bsc/gsm_data.h:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25659/2/include/osmocom/bsc/gsm_data.h@144">Patch Set #2, Line 144:</a> <code style="font-family:monospace,monospace">struct optional_val {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Might be a good idea to generalize this API and have it in libosmocore:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  #define OSMO_OPTFIELD(ftype, fname) \<br>    struct { \<br>      bool present; \<br>      ftype val; \<br>    } name;</pre><p style="white-space: pre-wrap; word-wrap: break-word;">so then one could use it with various types:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  struct foo {<br>    OSMO_OPTFIELD(struct bar_t, bar);<br>    OSMO_OPTFIELD(struct zoo_t, zoo);<br>    OSMO_OPTFIELD(uint32_t, counter);<br>  }</pre><p style="white-space: pre-wrap; word-wrap: break-word;">What do you think?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25659/2/include/osmocom/bsc/gsm_data.h@145">Patch Set #2, Line 145:</a> <code style="font-family:monospace,monospace">use</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I would call it 'valid' or even 'present'. Not critical though.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25659/2/include/osmocom/bsc/gsm_data.h@629">Patch Set #2, Line 629:</a> <code style="font-family:monospace,monospace">        bool ta_known;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Idea for a separate change: use 'struct optional_val' here too.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/osmo-bsc/+/25659">change 25659</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/osmo-bsc/+/25659"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-bsc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Iae20df4387c3d75752301bd5daeeea7508966393 </div>
<div style="display:none"> Gerrit-Change-Number: 25659 </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: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Sat, 02 Oct 2021 20:13:27 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: Yes </div>
<div style="display:none"> Gerrit-MessageType: comment </div>