<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">       struct gsm29205_gcr g = { .net_len = 3, .node = 0xDEAD }, p = { 0 };</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">It's ok, no pressing need to change it, but I refuse to accept that '{ 0 }' is better than '{}' in a […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">It's "better" using {0} for two reasons, but after reading in lots of places about the topic, there's no clear winner for one or another and I'd say depending on the case one, the other or both are good/better.</p><p style="white-space: pre-wrap; word-wrap: break-word;">1- I remember having to apply a fix in one place in osmocom code (there should be a patch somewhere in the repos) s/{}/{0}/ because the compiler was failing with some warning/error.<br>2- While reading about the topic due to this discussion, I read that some C standard required "[put here whatever compiler-world lexical foobar you want]" to b non-empty, but actually gcc supported empty ones through extension, and I think actually a later standard also supported empty ones.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So it's really not that important except for practical cases as in 1.</p></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: 4 </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: Tue, 11 Dec 2018 12:17:42 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-HasLabels: No </div>