<p>Patch set 2:<span style="border-radius: 3px; display: inline-block; margin: 0 2px; padding: 4px;background-color: #ffd4d4;">Code-Review -1</span></p><p><a href="https://gerrit.osmocom.org/11820">View Change</a></p><p>5 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11820/2/src/osmo-bsc/bsc_subscr_conn_fsm.c">File src/osmo-bsc/bsc_subscr_conn_fsm.c:</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/11820/2/src/osmo-bsc/bsc_subscr_conn_fsm.c@859">Patch Set #2, Line 859:</a> <code style="font-family:monospace,monospace">  /* initialize to some magic values that indicate "IE not [yet] received" */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(could drop the comment up to "indicate")</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/11820/2/src/osmo-bsc/osmo_bsc_lcls.c">File src/osmo-bsc/osmo_bsc_lcls.c:</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/11820/2/src/osmo-bsc/osmo_bsc_lcls.c@164">Patch Set #2, Line 164:</a> <code style="font-family:monospace,monospace">      old_cfg_csc.config = conn->lcls.config;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">please use a construct like this:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  old_cfg_csc = (struct old_cfg_csc){<br>      .config = conn->lcls.config,<br>      ...<br>   };</pre><p style="white-space: pre-wrap; word-wrap: break-word;">because that ensures that all struct members are initialized, and that there are no leftovers from a previous call. (because any member that isn't mentioned gets zero-initialized implicitly)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11820/2/src/osmo-bsc/osmo_bsc_lcls.c@167">Patch Set #2, Line 167:</a> <code style="font-family:monospace,monospace">      if (new_cfg_csc->config != 0xff) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">a magic nr left over</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11820/2/src/osmo-bsc/osmo_bsc_lcls.c@175">Patch Set #2, Line 175:</a> <code style="font-family:monospace,monospace">     if (new_cfg_csc->control != 0xff) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">another magic nr</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/11820/2/src/osmo-bsc/osmo_bsc_lcls.c@192">Patch Set #2, Line 192:</a> <code style="font-family:monospace,monospace">        old_cfg_csc = update_lcls_cfg_csc(conn, new_cfg_csc);</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">unrelated to this particular patch, but how can this make sense if the returned cfg is never used anywhere??</p><p style="white-space: pre-wrap; word-wrap: break-word;">Also I think the naming is weird, since the returned cfg should be the updated one, not the old one?</p><p style="white-space: pre-wrap; word-wrap: break-word;">If I'm right about this, could you plz create a new issue and possibly a patch...</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/11820">change 11820</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/11820"/><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-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I5e962d4fbb24bf1fb2398dc13e142a4a3304d858 </div>
<div style="display:none"> Gerrit-Change-Number: 11820 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Max <msuraev@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 21 Nov 2018 17:45:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: Yes </div>