fix memcmp usage