sdsrange() does not need to return a value.

Actaully the string is modified in-place and a reallocation is never
needed, so there is no need to return the new sds string pointer as
return value of the function, that is now just "void".
This commit is contained in:
antirez
2013-07-24 11:21:39 +02:00
parent 75b760a72d
commit 6ea8e0949c
5 changed files with 10 additions and 11 deletions

View File

@ -1153,7 +1153,7 @@ void clusterWriteHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
handleLinkIOError(link);
return;
}
link->sndbuf = sdsrange(link->sndbuf,nwritten,-1);
sdsrange(link->sndbuf,nwritten,-1);
if (sdslen(link->sndbuf) == 0)
aeDeleteFileEvent(server.el, link->fd, AE_WRITABLE);
}