]> git.saurik.com Git - redis.git/commitdiff
Fix the AOF fix of the latest commit ;)
authorantirez <antirez@gmail.com>
Thu, 1 Jul 2010 18:18:48 +0000 (20:18 +0200)
committerantirez <antirez@gmail.com>
Thu, 1 Jul 2010 18:18:48 +0000 (20:18 +0200)
src/aof.c

index ce177c8c6879f2e8ab28f665315a039090311063..1f615cf14ed08628b5e148c3a7a9a936b1a4f079 100644 (file)
--- a/src/aof.c
+++ b/src/aof.c
@@ -501,9 +501,9 @@ int rewriteAppendOnlyFile(char *filename) {
                         if (fwrite(cmd,sizeof(cmd)-1,1,fp) == 0) goto werr;
                         if (fwriteBulkObject(fp,&key) == 0) goto werr;
                         if (fwriteBulkString(fp,(char*)field,flen) == 0)
-                            return -1;
+                            goto werr;
                         if (fwriteBulkString(fp,(char*)val,vlen) == 0)
-                            return -1;
+                            goto werr;
                     }
                 } else {
                     dictIterator *di = dictGetIterator(o->ptr);
@@ -515,8 +515,8 @@ int rewriteAppendOnlyFile(char *filename) {
 
                         if (fwrite(cmd,sizeof(cmd)-1,1,fp) == 0) goto werr;
                         if (fwriteBulkObject(fp,&key) == 0) goto werr;
-                        if (fwriteBulkObject(fp,field) == -1) return REDIS_ERR;
-                        if (fwriteBulkObject(fp,val) == -1) return REDIS_ERR;
+                        if (fwriteBulkObject(fp,field) == 0) goto werr;
+                        if (fwriteBulkObject(fp,val) == 0) goto werr;
                     }
                     dictReleaseIterator(di);
                 }