Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/12020 )
Change subject: LCLS, TS 48.008: add GCR IE encoding/decoding ...................................................................... Patch Set 4: (1 comment) https://gerrit.osmocom.org/#/c/12020/4/tests/gsm0808/gsm0808_test.c File tests/gsm0808/gsm0808_test.c: https://gerrit.osmocom.org/#/c/12020/4/tests/gsm0808/gsm0808_test.c@586 PS4, Line 586: struct gsm29205_gcr g = { .net_len = 3, .node = 0xDEAD }, p = { 0 }; > It's ok, no pressing need to change it, but I refuse to accept that '{ 0 }' > is better than '{}' in a […] 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. 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. 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. So it's really not that important except for practical cases as in 1. -- To view, visit https://gerrit.osmocom.org/12020 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I82ce0207dc8de50689a8806c6471ad7fbae6219d Gerrit-Change-Number: 12020 Gerrit-PatchSet: 4 Gerrit-Owner: Max <[email protected]> Gerrit-Reviewer: Harald Welte <[email protected]> Gerrit-Reviewer: Jenkins Builder (1000002) Gerrit-Reviewer: Max <[email protected]> Gerrit-Reviewer: Neels Hofmeyr <[email protected]> Gerrit-Reviewer: Pau Espin Pedrol <[email protected]> Gerrit-CC: Stefan Sperling <[email protected]> Gerrit-Comment-Date: Tue, 11 Dec 2018 12:17:42 +0000 Gerrit-HasComments: Yes Gerrit-HasLabels: No
