tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Some changes to autoconfiguration APIs



    Date:        Wed, 4 Aug 2021 17:52:46 -0700
    From:        Jason Thorpe <thorpej%me.com@localhost>
    Message-ID:  <68FF8737-F347-4A7F-960B-9E4A6CA9EB59%me.com@localhost>

  | It addresses the concerns about compile-time type checking
  | by using an anonymous structure constructed in-line

Is there something in the C definition of such things which guarantees
that the un-init'd fields all get set to 0/NULL ?   Or is that just
happening because of the "const" spread all over - which might be causing
the compiler to allocate static storage, but which is not required of const?

Also, is there some way to distinguish an integer valued attribute which
is explicitly set to 0 from one which isn't set at all (in which case we
might want to default it to some other value) or do we only ever use
attributes via various kinds of pointers (or perhaps never have any,
anywhere ever, where 0 is a sensible value) ?

kre



Home | Main Index | Thread Index | Old Index