Add parentheses to the NULL_TERMINATE macro found in many samples
Put parentheses around the parameter concerning the NULL_TERMINATE macro. This macro is found in many samples.
Instead of:
#define NULL_TERMINATE(buf) buf[(sizeof(buf) / sizeof(buf[0])) - 1] = '\0'
we need to change to macro to
#define NULL_TERMINATE(buf) (buf)[(sizeof((buf)) / sizeof((buf)[0])) - 1] = '\0'