Skip to content

Commit

Permalink
Simplify redis#6379 changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
antirez authored and jschmieg committed Mar 24, 2020
1 parent 869c8db commit 42d39d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 1 addition & 4 deletions src/aof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1149,10 +1149,7 @@ int rioWriteBulkStreamID(rio *r,streamID *id) {
int retval;

sds replyid = sdscatfmt(sdsempty(),"%U-%U",id->ms,id->seq);
if ((retval = rioWriteBulkString(r,replyid,sdslen(replyid))) == 0) {
sdsfree(replyid);
return 0;
}
retval = rioWriteBulkString(r,replyid,sdslen(replyid));
sdsfree(replyid);
return retval;
}
Expand Down
8 changes: 3 additions & 5 deletions src/cluster.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,9 @@ int clusterLoadConfig(char *filename) {
} else {
start = stop = atoi(argv[j]);
}
if (start < 0 || start >= CLUSTER_SLOTS) {
sdsfreesplitres(argv,argc);
goto fmterr;
}
if (stop < 0 || stop >= CLUSTER_SLOTS) {
if (start < 0 || start >= CLUSTER_SLOTS ||
stop < 0 || stop >= CLUSTER_SLOTS)
{
sdsfreesplitres(argv,argc);
goto fmterr;
}
Expand Down

0 comments on commit 42d39d4

Please sign in to comment.