clone from redis-2.8.18