<p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21083">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/libosmocore/+/21083/1/src/gsm/gsm48_ie.c">File src/gsm/gsm48_ie.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/libosmocore/+/21083/1/src/gsm/gsm48_ie.c@1318">Patch Set #1, Line 1318:</a> <code style="font-family:monospace,monospace">classmark3_len > sizeof(data</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">How is this possible given that typeof(classmark3_len) is 'uint8_t' and thus the maximum is 255?<br>Maybe use size_t instead?</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21083/1/src/gsm/gsm48_ie.c@1326">Patch Set #1, Line 1326:</a> <code style="font-family:monospace,monospace">  bv.data = (uint8_t*) data;</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">why not using classmark3 directly?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I guess because of 'const', but what if we do it like this:</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">  const struct bitvec bv = (struct bitvec) {<br>    .data_len = classmark3_len,<br>    .data = (uint8_t *) data,<br>  };</pre><p style="white-space: pre-wrap; word-wrap: break-word;">This way there would be no need for memcpy() and memset(). All bitvec_get() functions should still work.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/21083/1/tests/gsm0408/gsm0408_test.c">File tests/gsm0408/gsm0408_test.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/libosmocore/+/21083/1/tests/gsm0408/gsm0408_test.c@330">Patch Set #1, Line 330:</a> <code style="font-family:monospace,monospace">void dump_cm3(struct gsm48_classmark3 *cm3)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">static</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/libosmocore/+/21083/1/tests/gsm0408/gsm0408_test.c@507">Patch Set #1, Line 507:</a> <code style="font-family:monospace,monospace">uint8_t</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">const</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/21083">change 21083</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/libosmocore/+/21083"/><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-Change-Id: Ic8b2bfd00330235f5bed00771e421588abfaac1f </div>
<div style="display:none"> Gerrit-Change-Number: 21083 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 09 Nov 2020 13:04:43 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>