<p><a href="https://gerrit.osmocom.org/12659">View Change</a></p><p>8 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c">File src/gsm/gsm48.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/12659/2/src/gsm/gsm48.c@1199">Patch Set #2, Line 1199:</a> <code style="font-family:monospace,monospace">snprintf(cm1, sizeof(cm1), "no-cm1");</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Again, I suggest to avoid this snprintf() call. Just initialize the cm1[]: […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">PoC: https://pastebin.com/rUvt095q</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1230">Patch Set #2, Line 1230:</a> <code style="font-family:monospace,monospace">const struct osmo_classmark *src, struct osmo_classmark *dst</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Let's follow the common (for memcpy, strcpy and memset) sequence here: dst, src.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1234">Patch Set #2, Line 1234:</a> <code style="font-family:monospace,monospace">dst->classmark1_set</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Should we assign false otherwise?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1238">Patch Set #2, Line 1238:</a> <code style="font-family:monospace,monospace">sizeof(dst->classmark2)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Why not classmark2_len?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1242">Patch Set #2, Line 1242:</a> <code style="font-family:monospace,monospace">sizeof</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">same</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1269">Patch Set #2, Line 1269:</a> <code style="font-family:monospace,monospace">} else {</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">Cosmetic: nesting is not required here, because we return from the main 'if' branch.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1271">Patch Set #2, Line 1271:</a> <code style="font-family:monospace,monospace">/* Inverted logic for this bit! */</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">This comment is actually related to the prev. line, please move it.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/#/c/12659/2/src/gsm/gsm48.c@1303">Patch Set #2, Line 1303:</a> <code style="font-family:monospace,monospace">return 0;</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">(just wondering) shouldn't we indicate this 'out of range' case somehow?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12659">change 12659</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/12659"/><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: Ifd27bab0380f7ad0c44c719aa6c8bd62cf7b034c </div>
<div style="display:none"> Gerrit-Change-Number: 12659 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder (1000002) </div>
<div style="display:none"> Gerrit-Reviewer: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 21 Jan 2019 05:28:22 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>