remove unnecessary memset, fix warning