On 7 March 2018 at 09:47, Eitan Adler <ead...@freebsd.org> wrote:
> Author: eadler
> Date: Wed Mar  7 14:47:43 2018
> New Revision: 330602
> URL: https://svnweb.freebsd.org/changeset/base/330602
>
> Log:
>   sys/cloudabi: Avoid relying on GNU specific extensions
>
>   An empty initializer list is not technically valid C grammar.
>
>   MFC After:    1 week
>
> -       cloudabi_fdstat_t fsb = {};
> +       cloudabi_fdstat_t fsb = {0};

In practice it appears initializing via { 0 } also zeros any padding
in the struct, but I do not believe it's required by the C standard.
Perhaps a language lawyer can weigh in?

Commenting on this commit just because it's highlighted by this
change; I do not believe there's a difference between the GNU
extension { } and { 0 } here.
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to