<p><a href="https://gerrit.osmocom.org/12954">View Change</a></p><p>1 comment:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/#/c/12954/6/src/encoding.cpp">File src/encoding.cpp:</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/12954/6/src/encoding.cpp@104">Patch Set #6, Line 104:</a> <code style="font-family:monospace,monospace">static inline bool write_tai(bitvec *dest, unsigned& wp, int8_t tai)</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">It's a bit weird that we now have two functions that essentially do the same. Could we wrap one in the other?</p><p style="white-space: pre-wrap; word-wrap: break-word;">Something like this looks equivalent for write_tai, but needs knowledge of bitvec internals:</p><p style="white-space: pre-wrap; word-wrap: break-word;">dest->cur_bit = wp;<br>write_ta_index(dest, tai);<br>wp = dest->cur_bit;</p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">if (tai < 0)<br> return false;<br>else<br> return true;</pre><p style="white-space: pre-wrap; word-wrap: break-word;">I must admit that I don't understand the idea behind wp since it is that same value as dest->cur_bit (unless I'm missing something). Maybe what's missing is a bitvec function to set and get the current bit cursor position?</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12954">change 12954</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/12954"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-pcu </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: comment </div>
<div style="display:none"> Gerrit-Change-Id: Ie180733d2584ebb16fb80b84526d0dbc70e3d441 </div>
<div style="display:none"> Gerrit-Change-Number: 12954 </div>
<div style="display:none"> Gerrit-PatchSet: 6 </div>
<div style="display:none"> Gerrit-Owner: Max <msuraev@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: 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-Reviewer: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: tnt <tnt@246tNt.com> </div>
<div style="display:none"> Gerrit-CC: Vadim Yanitskiy <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-CC: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 22 Feb 2019 16:42:44 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>