Clean up text throughout project

- Remove trailing newlines from redis.conf
  - Fix comment misspelling
  - Clarifies zipEncodeLength usage and a C API mention (#1243, #1242)
  - Fix cluster typos (inspired by @papanikge #1507)
  - Fix rewite -> rewrite in a few places (inspired by #682)

Closes #1243, #1242, #1507
This commit is contained in:
Matt Stancliff
2014-07-31 14:51:05 -04:00
committed by antirez
parent 22e6f434f8
commit e0ffc863c6
5 changed files with 16 additions and 16 deletions

View File

@ -73,7 +73,7 @@ void aofRewriteBufferReset(void) {
listSetFreeMethod(server.aof_rewrite_buf_blocks,zfree); listSetFreeMethod(server.aof_rewrite_buf_blocks,zfree);
} }
/* Return the current size of the AOF rewite buffer. */ /* Return the current size of the AOF rewrite buffer. */
unsigned long aofRewriteBufferSize(void) { unsigned long aofRewriteBufferSize(void) {
listNode *ln = listLast(server.aof_rewrite_buf_blocks); listNode *ln = listLast(server.aof_rewrite_buf_blocks);
aofrwblock *block = ln ? ln->value : NULL; aofrwblock *block = ln ? ln->value : NULL;
@ -202,7 +202,7 @@ int startAppendOnly(void) {
redisLog(REDIS_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error."); redisLog(REDIS_WARNING,"Redis needs to enable the AOF but can't trigger a background AOF rewrite operation. Check the above logs for more info about the error.");
return REDIS_ERR; return REDIS_ERR;
} }
/* We correctly switched on AOF, now wait for the rewite to be complete /* We correctly switched on AOF, now wait for the rewrite to be complete
* in order to append data on disk. */ * in order to append data on disk. */
server.aof_state = REDIS_AOF_WAIT_REWRITE; server.aof_state = REDIS_AOF_WAIT_REWRITE;
return REDIS_OK; return REDIS_OK;

View File

@ -2106,7 +2106,7 @@ void sentinelPublishReplyCallback(redisAsyncContext *c, void *reply, void *privd
* or sent directly to this sentinel via the (fake) PUBLISH command of Sentinel. * or sent directly to this sentinel via the (fake) PUBLISH command of Sentinel.
* *
* If the master name specified in the message is not known, the message is * If the master name specified in the message is not known, the message is
* discareded. */ * discarded. */
void sentinelProcessHelloMessage(char *hello, int hello_len) { void sentinelProcessHelloMessage(char *hello, int hello_len) {
/* Format is composed of 8 tokens: /* Format is composed of 8 tokens:
* 0=ip,1=port,2=runid,3=current_epoch,4=master_name, * 0=ip,1=port,2=runid,3=current_epoch,4=master_name,

View File

@ -385,7 +385,7 @@ int string2l(const char *s, size_t slen, long *lval) {
} }
/* Convert a double to a string representation. Returns the number of bytes /* Convert a double to a string representation. Returns the number of bytes
* required. The representation should always be parsable by stdtod(3). */ * required. The representation should always be parsable by strtod(3). */
int d2string(char *buf, size_t len, double value) { int d2string(char *buf, size_t len, double value) {
if (isnan(value)) { if (isnan(value)) {
len = snprintf(buf,len,"nan"); len = snprintf(buf,len,"nan");

View File

@ -183,7 +183,7 @@ static unsigned int zipIntSize(unsigned char encoding) {
return 0; return 0;
} }
/* Encode the length 'l' writing it in 'p'. If p is NULL it just returns /* Encode the length 'rawlen' writing it in 'p'. If p is NULL it just returns
* the amount of bytes required to encode such a length. */ * the amount of bytes required to encode such a length. */
static unsigned int zipEncodeLength(unsigned char *p, unsigned char encoding, unsigned int rawlen) { static unsigned int zipEncodeLength(unsigned char *p, unsigned char encoding, unsigned int rawlen) {
unsigned char len = 1, buf[5]; unsigned char len = 1, buf[5];