Redisソース系列31:redis-beta-1 Upgrade to redis-beta-2


全部で5箇所修正
1)saveDb(char*filename)関数で
if (fwrite(sval,sdslen(sval),1,fp) == 0) goto werr;
VS
if (sdslen(sval) &&
     fwrite(sval,sdslen(sval),1,fp) == 0) goto werr;
       

2)saveDb(char*filename)関数で
if (fwrite(eleobj->ptr,sdslen(eleobj->ptr),1,fp) == 0)
                        goto werr;
VS
 if (sdslen(eleobj->ptr) && fwrite(eleobj->ptr,sdslen(eleobj->ptr),1,fp) == 0)
                        goto werr;
       

3)saveDb(char*filename)関数で
redisLog(REDIS_WARNING,"Error saving DB on disk: %s", strerror(errno));
VS
redisLog(REDIS_WARNING,"Write error saving DB on disk: %s", strerror(errno));

4)loadDb(char*filename)関数で
if (fread(val,vlen,1,fp) == 0) goto eoferr;
VS
if (vlen && fread(val,vlen,1,fp) == 0) goto eoferr;
       

5)loadDb(char*filename)関数で
if (fread(val,vlen,1,fp) == 0) goto eoferr;
VS
if (vlen && fread(val,vlen,1,fp) == 0) goto eoferr;
          

今回のアップグレード1)はruby client 2)を追加して既存コードを修正する.