Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/compat/sys
> Date: Fri, 15 Jun 2018 19:55:28 +0700
> From: Robert Elz <kre%munnari.OZ.AU@localhost>
>
> Another way would be
>
> static const struct timespec50 zts = { 0 };
> and
> *ts50 = zts;
I have nothing substantive to add about the question at hand, but one
tiny nit: there is no need for the initializer in this case, and
indeed if you have -Werror=missing-field-initializers as I think we do
by default, writing out the full initializer is a pain.
It suffices to say
static const struct timespec50 zts;
and the implementation will guarantee it is initialized to all
zero/null as appropriate.
Home |
Main Index |
Thread Index |
Old Index