I have an old piece of code with a big struct that looks like this:
typedef struct {
long test1;
char test2[10]
…
} teststruct;
This struct gets initialized like this:
memset(teststruct, 0, sizeof(teststruct0));
I must not change this code in any way. How do I efficiently check if the struct is empty, or has been modified after the memset()
?