Commit 60ff8095 authored by antirez's avatar antirez
Browse files

No more trailing spaces in Redis source code.

parent e9cd75dc
...@@ -198,7 +198,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) { ...@@ -198,7 +198,7 @@ void replicationFeedSlaves(list *slaves, int dictid, robj **argv, int argc) {
long objlen = stringObjectLen(argv[j]); long objlen = stringObjectLen(argv[j]);
/* We need to feed the buffer with the object as a bulk reply /* We need to feed the buffer with the object as a bulk reply
* not just as a plain string, so create the $..CRLF payload len * not just as a plain string, so create the $..CRLF payload len
* ad add the final CRLF */ * ad add the final CRLF */
aux[0] = '$'; aux[0] = '$';
len = ll2string(aux+1,sizeof(aux)-1,objlen); len = ll2string(aux+1,sizeof(aux)-1,objlen);
...@@ -1620,7 +1620,7 @@ void replicationCron(void) { ...@@ -1620,7 +1620,7 @@ void replicationCron(void) {
if (server.masterhost && server.master && if (server.masterhost && server.master &&
!(server.master->flags & REDIS_PRE_PSYNC)) !(server.master->flags & REDIS_PRE_PSYNC))
replicationSendAck(); replicationSendAck();
/* If we have attached slaves, PING them from time to time. /* If we have attached slaves, PING them from time to time.
* So slaves can implement an explicit timeout to masters, and will * So slaves can implement an explicit timeout to masters, and will
* be able to detect a link disconnection even if the TCP connection * be able to detect a link disconnection even if the TCP connection
......
...@@ -123,7 +123,7 @@ void sdsclear(sds s) { ...@@ -123,7 +123,7 @@ void sdsclear(sds s) {
/* Enlarge the free space at the end of the sds string so that the caller /* Enlarge the free space at the end of the sds string so that the caller
* is sure that after calling this function can overwrite up to addlen * is sure that after calling this function can overwrite up to addlen
* bytes after the end of the string, plus one more byte for nul term. * bytes after the end of the string, plus one more byte for nul term.
* *
* Note: this does not change the *length* of the sds string as returned * Note: this does not change the *length* of the sds string as returned
* by sdslen(), but only the free buffer space we have. */ * by sdslen(), but only the free buffer space we have. */
sds sdsMakeRoomFor(sds s, size_t addlen) { sds sdsMakeRoomFor(sds s, size_t addlen) {
......
...@@ -119,7 +119,7 @@ ssize_t syncRead(int fd, char *ptr, ssize_t size, long long timeout) { ...@@ -119,7 +119,7 @@ ssize_t syncRead(int fd, char *ptr, ssize_t size, long long timeout) {
/* Read a line making sure that every char will not require more than 'timeout' /* Read a line making sure that every char will not require more than 'timeout'
* milliseconds to be read. * milliseconds to be read.
* *
* On success the number of bytes read is returned, otherwise -1. * On success the number of bytes read is returned, otherwise -1.
* On success the string is always correctly terminated with a 0 byte. */ * On success the string is always correctly terminated with a 0 byte. */
ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) { ssize_t syncReadLine(int fd, char *ptr, ssize_t size, long long timeout) {
......
...@@ -1015,7 +1015,7 @@ void handleClientsBlockedOnLists(void) { ...@@ -1015,7 +1015,7 @@ void handleClientsBlockedOnLists(void) {
} }
} }
} }
if (listTypeLength(o) == 0) dbDelete(rl->db,rl->key); if (listTypeLength(o) == 0) dbDelete(rl->db,rl->key);
/* We don't call signalModifiedKey() as it was already called /* We don't call signalModifiedKey() as it was already called
* when an element was pushed on the list. */ * when an element was pushed on the list. */
......
...@@ -515,7 +515,7 @@ void srandmemberWithCountCommand(redisClient *c) { ...@@ -515,7 +515,7 @@ void srandmemberWithCountCommand(redisClient *c) {
size--; size--;
} }
} }
/* CASE 4: We have a big set compared to the requested number of elements. /* CASE 4: We have a big set compared to the requested number of elements.
* In this case we can simply get random elements from the set and add * In this case we can simply get random elements from the set and add
* to the temporary set, trying to eventually get enough unique elements * to the temporary set, trying to eventually get enough unique elements
......
...@@ -1169,7 +1169,7 @@ void zsetConvert(robj *zobj, int encoding) { ...@@ -1169,7 +1169,7 @@ void zsetConvert(robj *zobj, int encoding) {
} }
/*----------------------------------------------------------------------------- /*-----------------------------------------------------------------------------
* Sorted set commands * Sorted set commands
*----------------------------------------------------------------------------*/ *----------------------------------------------------------------------------*/
/* This generic command implements both ZADD and ZINCRBY. */ /* This generic command implements both ZADD and ZINCRBY. */
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
* signal the end of the hash. The special value 254 is used to mark * signal the end of the hash. The special value 254 is used to mark
* empty space that can be used to add new key/value pairs. * empty space that can be used to add new key/value pairs.
* *
* <free> is the number of free unused bytes after the string, resulting * <free> is the number of free unused bytes after the string, resulting
* from modification of values associated to a key. For instance if "foo" * from modification of values associated to a key. For instance if "foo"
* is set to "bar", and later "foo" will be set to "hi", it will have a * is set to "bar", and later "foo" will be set to "hi", it will have a
* free byte to use if the value will enlarge again later, or even in * free byte to use if the value will enlarge again later, or even in
...@@ -186,7 +186,7 @@ static unsigned int zipmapRawKeyLength(unsigned char *p) { ...@@ -186,7 +186,7 @@ static unsigned int zipmapRawKeyLength(unsigned char *p) {
static unsigned int zipmapRawValueLength(unsigned char *p) { static unsigned int zipmapRawValueLength(unsigned char *p) {
unsigned int l = zipmapDecodeLength(p); unsigned int l = zipmapDecodeLength(p);
unsigned int used; unsigned int used;
used = zipmapEncodeLength(NULL,l); used = zipmapEncodeLength(NULL,l);
used += p[used] + 1 + l; used += p[used] + 1 + l;
return used; return used;
...@@ -214,7 +214,7 @@ unsigned char *zipmapSet(unsigned char *zm, unsigned char *key, unsigned int kle ...@@ -214,7 +214,7 @@ unsigned char *zipmapSet(unsigned char *zm, unsigned char *key, unsigned int kle
unsigned int freelen, reqlen = zipmapRequiredLength(klen,vlen); unsigned int freelen, reqlen = zipmapRequiredLength(klen,vlen);
unsigned int empty, vempty; unsigned int empty, vempty;
unsigned char *p; unsigned char *p;
freelen = reqlen; freelen = reqlen;
if (update) *update = 0; if (update) *update = 0;
p = zipmapLookupRaw(zm,key,klen,&zmlen); p = zipmapLookupRaw(zm,key,klen,&zmlen);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment