Some compiler does not support 0 sized array. This patch changes 0 sized array to have NULL and using variable instead of sizeof function.