Removed a long time warning compiling with recent GCC on Linux

This commit is contained in:
antirez 2009-11-11 19:59:54 +01:00
parent a81885d9ea
commit fee803ba3e
2 changed files with 4 additions and 2 deletions

2
TODO
View File

@ -4,7 +4,7 @@ VERSION 1.1 TODO
* Man pages for MSET MSETNX and SRANDMEMBER, Z-commands, ...
* ZSETs missing stuff: ZINCRBY
* Use strcoll() to compare objects in sorted sets, like it already happens for SORT.
* EXPIRE, EXPIREAT, ZSCORE tests.
* LPOPPUSH, EXPIRE, EXPIREAT, ZSCORE, SRANDMEMBER tests.
* Write docs for the "STORE" operaiton of SORT, and GET "#" option.
* Append only mode: testing and a command to rebuild the log from scratch.
* Profiling and optimizations. For instance the commands lookup is probably starting to eat too CPU being a simple list. To implement binary search or an hash table lookup can be a win probably.

View File

@ -1893,7 +1893,9 @@ static void acceptHandler(aeEventLoop *el, int fd, void *privdata, int mask) {
char *err = "-ERR max number of clients reached\r\n";
/* That's a best effort error message, don't check write errors */
(void) write(c->fd,err,strlen(err));
if (write(c->fd,err,strlen(err)) == -1) {
/* Nothing to do, Just to avoid the warning... */
}
freeClient(c);
return;
}