Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common/sfc_efx/base: use C11 static assert
[ upstream commit 047d7032b76a226f2f1c36775688950933f9121b ] The sfc base code had its own definition of static assertions using the out of bound array access hack. Replace it with a static_assert like rte_common.h. The use of null pointer to compute offset is not always a constant in older versions of clang. Use standard offsetof() instead. Fixes: f67e471 ("net/sfc/base: fix coding style") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Morten Brørup <mb@smartsharesystems.com> Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
- Loading branch information