<p><a href="https://gerrit.osmocom.org/13137">View Change</a></p><p>4 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c">File src/libmsc/call_leg.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/13137/9/src/libmsc/call_leg.c@158">Patch Set #9, Line 158:</a> <code style="font-family:monospace,monospace">rtps = data;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">> it is to clarify the type of the data argument [...] […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">The way I usually do it is define a local variable that indicates the *data type, and then use it in various switch cases. Here it happens to be only the one case...</p><p style="white-space: pre-wrap; word-wrap: break-word;">Why are we arguing about this? :)</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@178">Patch Set #9, Line 178:</a> <code style="font-family:monospace,monospace">struct call_leg *cl = fi->priv;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Also same opinion, variable is not needed for that: […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">indeed, it's not type safety, it is merely "type safety".</p><p style="white-space: pre-wrap; word-wrap: break-word;">The way I usually do it is assign fi->priv to a local variable of the correct type and then use it in various places of that function. Here it happens to be only the one, and also happens to be passed as a void*.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Nevertheless I prefer to keep that style consistent across the entire file.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/call_leg.c@290">Patch Set #9, Line 290:</a> <code style="font-family:monospace,monospace">call_leg_ensure_rtp_alloc</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Well, call_leg_rtp_alloc() also would just return 0 if it was already called for a given RTP stream. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">oh. what was I thinking.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/13137/9/src/libmsc/gsm_04_08.c">File src/libmsc/gsm_04_08.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/13137/9/src/libmsc/gsm_04_08.c@156">Patch Set #9, Line 156:</a> <code style="font-family:monospace,monospace">DEBUGP</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">> This is legacy logging, not sure if we really need to change all of it now? […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">And I would rather share the work load :P</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/13137">change 13137</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/13137"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-msc </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: I27e4988e0371808b512c757d2b52ada1615067bd </div>
<div style="display:none"> Gerrit-Change-Number: 13137 </div>
<div style="display:none"> Gerrit-PatchSet: 9 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Harald Welte <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Pau Espin Pedrol <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 08 May 2019 15:00:16 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>