<p>Patch set 10:<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/c/libosmo-abis/+/14743">View Change</a></p><p>7 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c">File src/input/ipaccess.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/libosmo-abis/+/14743/10/src/input/ipaccess.c@74">Patch Set #10, Line 74:</a> <code style="font-family:monospace,monospace">       struct osmo_fsm_inst** ka_fsm;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I don't see a point in using pointers to pointers here simply to have 3 shorter lines which fit anyway, so better remove it and use e1i_ts->driver.ipaccess.ka_fsm for everyone's mental sanity :)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@130">Patch Set #10, Line 130:</a> <code style="font-family:monospace,monospace">    struct osmo_fsm_inst** ka_fsm;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Again avoid this. If you want, catch any of this in a pointer: <br>ipaccess_line_ts(bfd, line)<br>&ipaccess_line_ts(bfd, line)->driver<br>&ipaccess_line_ts(bfd, line)->driver.ipaccess</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@262">Patch Set #10, Line 262:</a> <code style="font-family:monospace,monospace">                  ka_fsm = &ipaccess_line_ts(newbfd, new_line)->driver.ipaccess.ka_fsm;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This chunk is mostly copied from the OML part above. Feels like it'd be clearer to have it in a static function.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@304">Patch Set #10, Line 304:</a> <code style="font-family:monospace,monospace">       struct osmo_fsm_inst** ka_fsm = &ipaccess_line_ts(bfd, line)->driver.ipaccess.ka_fsm;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same, avoid pointers to pointers for this kind of use.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@390">Patch Set #10, Line 390:</a> <code style="font-family:monospace,monospace">             struct osmo_fsm_inst* ka_fsm = ipaccess_line_ts(bfd, line)->driver.ipaccess.ka_fsm;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I didn't know you could do this with static inline functions (as if it was a macro). Not sure if all compilers are going to like it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@1045">Patch Set #10, Line 1045:</a> <code style="font-family:monospace,monospace">               if (line->ipa_kap) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">I see this chunk of code again and again. I'm sure it can go into a function.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743/10/src/input/ipaccess.c@1111">Patch Set #10, Line 1111:</a> <code style="font-family:monospace,monospace">     if (line->ipa_kap) {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Same chunk of code again.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmo-abis/+/14743">change 14743</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/libosmo-abis/+/14743"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmo-abis </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I30e3bd601e55355aaf738ee2f2c44c1ec2c46c6a </div>
<div style="display:none"> Gerrit-Change-Number: 14743 </div>
<div style="display:none"> Gerrit-PatchSet: 10 </div>
<div style="display:none"> Gerrit-Owner: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Assignee: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Hoernchen <ewild@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 22 Jan 2020 12:12:29 +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>