<p><a href="https://gerrit.osmocom.org/12020">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/12020/4/tests/gsm0808/gsm0808_test.c">File tests/gsm0808/gsm0808_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/12020/4/tests/gsm0808/gsm0808_test.c@586">Patch Set #4, Line 586:</a> <code style="font-family:monospace,monospace">{</code></p><p style="white-space: pre-wrap; word-wrap: break-word;">No need to be bitter about it: it's not the first time people disagree with you (or me, or Pau...) nor the last.</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">you dismiss a sound argument<br>If you find it sound it doesn't mean others would automatically share your opinion.</p></blockquote><p style="white-space: pre-wrap; word-wrap: break-word;">Here're some more details since you insist:</p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">memset() is the byte hacking way and I don't like it...<br>It's a standard function and your liking/disliking it is irrelevant and hardly a sound argument.</p></blockquote><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">just 'var = {0}' doesn't work you need to supply the type name to the compiler (unless it is a new variable declaration init...<br>Irrelevant in this case because "it's a new variable declaration init".</p></blockquote><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">the struct variable is part of ran_conn...<br>Irrelevant again - it's standalone struct which we initialize entirely.</p></blockquote><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">to write "{0}" means that I indicate the first item's value to be zero...<br>The only part of your link which is actually applicable to the code you're commenting on. Yes, initializing via {} is equivalent to {0} precisely because {} initialize entire thing with 0 and { x } initialize first byte with x and the rest with 0. And yes, it's "more general" if you will. But nobody have argued with those points to begin with. My point was (and still is) that it's easier to read the code because the 0 immediately reminds you how the rest is initialized. That's also seems to be preferred variant in libosmocore so far according to git grep.</p></blockquote></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/12020">change 12020</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/12020"/><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: I82ce0207dc8de50689a8806c6471ad7fbae6219d </div>
<div style="display:none"> Gerrit-Change-Number: 12020 </div>
<div style="display:none"> Gerrit-PatchSet: 18 </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-CC: Stefan Sperling <stsp@stsp.name> </div>
<div style="display:none"> Gerrit-Comment-Date: Wed, 12 Dec 2018 12:46:30 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>