Skip to content
  • Darius Davis's avatar
    Use array_length instead of "sizeof arr / sizeof (TYPE)" (Part 2). · 10d70661
    Darius Davis authored
    This wide-ranging change replaces the vast majority of instances of the "sizeof
    arr / sizeof (TYPE)" pattern (and a few more "sizeof arr / sizeof var", "sizeof
    arr / sizeof arr[1]", etc.) with the array_length macro.
    A small number of cases of "sizeof arr / sizeof (TYPE)" remain; These appear to
    be legitimate divisions of some array/variable's size by the size of some
    _other_ TYPE unrelated to the array/variable type -- i.e. computing number of
    records/samples which will fit in a given buffer.
    A few unused variables/macros were removed instead of being updated.
    Trivial formatting changes were made in a few places.
    As with the previous part of this cleanup, comparison of the built object files
    confirms that most of the changes have no net effect and the few actual changes
    are trivial and harmless.  Some changes are apparent in debug info (to be
    expected), in __LINE__ values (also to be expected), and the simplification in
    the opcua plug...