What is the type of the third parameter in the call above?
size_t
Number of bytes to compare.
what is it doing ?
if (sizeof(st.magic) == 0 && st.version == 0)
memcmp(st.magic, "outpt_01", 1);
else
memcmp(st.magic, "outpt_01", 0);
As pointed out by @JoachimPileborg, there is a typo in:
memcmp(st.magic, "outpt_01",sizeof(st.magic)) == 0 && st.version == 0 )
------------------------------------------------------------------------^ extra closing parenthesis
or it is part of a condition like (makes more sense):
if (memcmp(st.magic, "outpt_01",sizeof(st.magic)) == 0 && st.version == 0) {