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>
#include <setjmp.h>
#include <stdio.h>
#include <stdint.h>
+#include <stddef.h>
#define UCI_CONFDIR "/etc/config"
#define UCI_SAVEDIR "/tmp/.uci"
};
-/* linked list handling */
-#ifndef offsetof
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
-#endif
-
/**
* container_of - cast a member of a structure out to the containing structure
* @ptr: the pointer to the member.