re-fix build error about snprintf