uci: silence UBSAN error by using offsetof macro from compiler
authorPetr Štetiar <ynezz@true.cz>
Fri, 2 Oct 2020 12:52:19 +0000 (14:52 +0200)
committerPetr Štetiar <ynezz@true.cz>
Sat, 3 Oct 2020 07:46:18 +0000 (09:46 +0200)
commit671c7554bfdeab758f605d1e1a2420117e96a628
tree4ac2b2da8733c08cb061b4b60cc36ad43fb36b92
parentea5bbd57d0e1f3ff5fd3b8580741c46093caa845
uci: silence UBSAN error by using offsetof macro from compiler

Fixes following ubdefined-behavior as reported by clang version 10.0.0-4ubuntu1~18.04.2:

 delta.c:139:52: runtime error: member access within null pointer of type 'struct uci_element'
 SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior delta.c:139:52

Signed-off-by: Petr Štetiar <ynezz@true.cz>
uci.h