fix replica compfunc bug: strncmp to memcmp