diff --git a/redis.conf b/redis.conf index c68fe694f..c6403edb1 100644 --- a/redis.conf +++ b/redis.conf @@ -579,7 +579,7 @@ slave-priority 100 # it with the specified string. # 4) During replication, when a slave performs a full resynchronization with # its master, the content of the whole database is removed in order to -# load the RDB file just transfered. +# load the RDB file just transferred. # # In all the above cases the default is to delete objects in a blocking way, # like if DEL was called. However you can configure each case specifically diff --git a/src/atomicvar.h b/src/atomicvar.h index 3489972d2..313d83dd5 100644 --- a/src/atomicvar.h +++ b/src/atomicvar.h @@ -7,7 +7,7 @@ * atomicDecr(var,count,mutex) -- Decrement the atomic counter * atomicGet(var,dstvar,mutex) -- Fetch the atomic counter value * - * If atomic primitives are availble (tested in config.h) the mutex + * If atomic primitives are available (tested in config.h) the mutex * is not used. * * Never use return value from the macros. To update and get use instead: diff --git a/src/cluster.c b/src/cluster.c index 2f00e4d1d..5e499112e 100644 --- a/src/cluster.c +++ b/src/cluster.c @@ -2920,7 +2920,7 @@ void clusterHandleSlaveFailover(void) { (unsigned long long) myself->configEpoch); } - /* Take responsability for the cluster slots. */ + /* Take responsibility for the cluster slots. */ clusterFailoverReplaceYourMaster(); } else { clusterLogCantFailover(CLUSTER_CANT_FAILOVER_WAITING_VOTES); @@ -2975,7 +2975,7 @@ void clusterHandleSlaveMigration(int max_slaves) { * masters with the greatest number of ok slaves, I'm the one with the * smallest node ID (the "candidate slave"). * - * Note: this means that eventually a replica migration will occurr + * Note: this means that eventually a replica migration will occur * since slaves that are reachable again always have their FAIL flag * cleared, so eventually there must be a candidate. At the same time * this does not mean that there are no race conditions possible (two diff --git a/src/db.c b/src/db.c index d8352ec38..7b02f38a9 100644 --- a/src/db.c +++ b/src/db.c @@ -242,7 +242,7 @@ robj *dbUnshareStringValue(redisDb *db, robj *key, robj *o) { * If callback is given the function is called from time to time to * signal that work is in progress. * - * The dbnum can be -1 if all teh DBs should be flushed, or the specified + * The dbnum can be -1 if all the DBs should be flushed, or the specified * DB number if we want to flush only a single Redis database number. * * Flags are be EMPTYDB_NO_FLAGS if no special flags are specified or diff --git a/src/debug.c b/src/debug.c index ed8329de0..615f874ba 100644 --- a/src/debug.c +++ b/src/debug.c @@ -920,7 +920,7 @@ void sigsegvHandler(int sig, siginfo_t *info, void *secret) { "Redis %s crashed by signal: %d", REDIS_VERSION, sig); if (eip != NULL) { serverLog(LL_WARNING, - "Crashed running the instuction at: %p", eip); + "Crashed running the instruction at: %p", eip); } if (sig == SIGSEGV || sig == SIGBUS) { serverLog(LL_WARNING, diff --git a/src/dict.c b/src/dict.c index 4425a94e8..17fdbea68 100644 --- a/src/dict.c +++ b/src/dict.c @@ -380,7 +380,7 @@ int dictReplace(dict *d, void *key, void *val) dictEntry *entry, auxentry; /* Try to add the element. If the key - * does not exists dictAdd will suceed. */ + * does not exists dictAdd will succeed. */ if (dictAdd(d, key, val) == DICT_OK) return 1; /* It already exists, get the entry */ diff --git a/src/endianconv.h b/src/endianconv.h index 08f553136..569f9137b 100644 --- a/src/endianconv.h +++ b/src/endianconv.h @@ -43,7 +43,7 @@ uint16_t intrev16(uint16_t v); uint32_t intrev32(uint32_t v); uint64_t intrev64(uint64_t v); -/* variants of the function doing the actual convertion only if the target +/* variants of the function doing the actual conversion only if the target * host is big endian */ #if (BYTE_ORDER == LITTLE_ENDIAN) #define memrev16ifbe(p) diff --git a/src/hyperloglog.c b/src/hyperloglog.c index 8ccc16be2..8a0b80e9b 100644 --- a/src/hyperloglog.c +++ b/src/hyperloglog.c @@ -875,7 +875,7 @@ promote: /* Promote to dense representation. */ * * Note that this in turn means that PFADD will make sure the command * is propagated to slaves / AOF, so if there is a sparse -> dense - * convertion, it will be performed in all the slaves as well. */ + * conversion, it will be performed in all the slaves as well. */ int dense_retval = hllDenseAdd(hdr->registers, ele, elesize); serverAssert(dense_retval == 1); return dense_retval; diff --git a/src/quicklist.c b/src/quicklist.c index be02e3276..8ae5b2f91 100644 --- a/src/quicklist.c +++ b/src/quicklist.c @@ -1635,7 +1635,7 @@ int quicklistTest(int argc, char *argv[]) { TEST("add to tail of empty list") { quicklist *ql = quicklistNew(-2, options[_i]); quicklistPushTail(ql, "hello", 6); - /* 1 for head and 1 for tail beacuse 1 node = head = tail */ + /* 1 for head and 1 for tail because 1 node = head = tail */ ql_verify(ql, 1, 1, 1, 1); quicklistRelease(ql); } @@ -1643,7 +1643,7 @@ int quicklistTest(int argc, char *argv[]) { TEST("add to head of empty list") { quicklist *ql = quicklistNew(-2, options[_i]); quicklistPushHead(ql, "hello", 6); - /* 1 for head and 1 for tail beacuse 1 node = head = tail */ + /* 1 for head and 1 for tail because 1 node = head = tail */ ql_verify(ql, 1, 1, 1, 1); quicklistRelease(ql); } diff --git a/src/redis-cli.c b/src/redis-cli.c index 287b8a6d8..2699eb064 100644 --- a/src/redis-cli.c +++ b/src/redis-cli.c @@ -1864,15 +1864,15 @@ static void getKeySizes(redisReply *keys, int *types, keys->element[i]->str); } - /* Retreive sizes */ + /* Retrieve sizes */ for(i=0;ielements;i++) { - /* Skip keys that dissapeared between SCAN and TYPE */ + /* Skip keys that disappeared between SCAN and TYPE */ if(types[i] == TYPE_NONE) { sizes[i] = 0; continue; } - /* Retreive size */ + /* Retrieve size */ if(redisGetReply(context, (void**)&reply)!=REDIS_OK) { fprintf(stderr, "Error getting size for key '%s' (%d: %s)\n", keys->element[i]->str, context->err, context->errstr); @@ -1942,7 +1942,7 @@ static void findBigKeys(void) { arrsize = keys->elements; } - /* Retreive types and then sizes */ + /* Retrieve types and then sizes */ getKeyTypes(keys, types); getKeySizes(keys, types, sizes); diff --git a/src/redis-trib.rb b/src/redis-trib.rb index a38a01eaf..916e71e6b 100755 --- a/src/redis-trib.rb +++ b/src/redis-trib.rb @@ -453,7 +453,7 @@ class RedisTrib # Handle case "1": keys in no node. if none.length > 0 - xputs "The folowing uncovered slots have no keys across the cluster:" + xputs "The following uncovered slots have no keys across the cluster:" xputs none.keys.join(",") yes_or_die "Fix these slots by covering with a random node?" none.each{|slot,nodes| @@ -465,7 +465,7 @@ class RedisTrib # Handle case "2": keys only in one node. if single.length > 0 - xputs "The folowing uncovered slots have keys in just one node:" + xputs "The following uncovered slots have keys in just one node:" puts single.keys.join(",") yes_or_die "Fix these slots by covering with those nodes?" single.each{|slot,nodes| @@ -476,7 +476,7 @@ class RedisTrib # Handle case "3": keys in multiple nodes. if multi.length > 0 - xputs "The folowing uncovered slots have keys in multiple nodes:" + xputs "The following uncovered slots have keys in multiple nodes:" xputs multi.keys.join(",") yes_or_die "Fix these slots by moving keys into a single node?" multi.each{|slot,nodes| @@ -1616,7 +1616,7 @@ private ] end -# Turn a key name into the corrisponding Redis Cluster slot. +# Turn a key name into the corresponding Redis Cluster slot. def key_to_slot(key) # Only hash what is inside {...} if there is such a pattern in the key. # Note that the specification requires the content that is between diff --git a/src/replication.c b/src/replication.c index 8aa0d807a..7dcd64e3d 100644 --- a/src/replication.c +++ b/src/replication.c @@ -494,7 +494,7 @@ need_full_resync: * Side effects, other than starting a BGSAVE: * * 1) Handle the slaves in WAIT_START state, by preparing them for a full - * sync if the BGSAVE was succesfully started, or sending them an error + * sync if the BGSAVE was successfully started, or sending them an error * and dropping them from the list of slaves. * * 2) Flush the Lua scripting script cache if the BGSAVE was actually @@ -804,7 +804,7 @@ void sendBulkToSlave(aeEventLoop *el, int fd, void *privdata, int mask) { } } - /* If the preamble was already transfered, send the RDB bulk data. */ + /* If the preamble was already transferred, send the RDB bulk data. */ lseek(slave->repldbfd,slave->repldboff,SEEK_SET); buflen = read(slave->repldbfd,buf,PROTO_IOBUF_LEN); if (buflen <= 0) { @@ -1237,7 +1237,7 @@ char *sendSynchronousCommand(int flags, int fd, ...) { * * The function returns: * - * PSYNC_CONTINUE: If the PSYNC command succeded and we can continue. + * PSYNC_CONTINUE: If the PSYNC command succeeded and we can continue. * PSYNC_FULLRESYNC: If PSYNC is supported but a full resync is needed. * In this case the master run_id and global replication * offset is saved. diff --git a/src/rio.c b/src/rio.c index 37b2b0375..18a21cfca 100644 --- a/src/rio.c +++ b/src/rio.c @@ -163,7 +163,7 @@ void rioInitWithFile(rio *r, FILE *fp) { * The function returns success as long as we are able to correctly write * to at least one file descriptor. * - * When buf is NULL adn len is 0, the function performs a flush operation + * When buf is NULL and len is 0, the function performs a flush operation * if there is some pending buffer, so this function is also used in order * to implement rioFdsetFlush(). */ static size_t rioFdsetWrite(rio *r, const void *buf, size_t len) { diff --git a/src/sentinel.c b/src/sentinel.c index da0a400da..e4ecaa99d 100644 --- a/src/sentinel.c +++ b/src/sentinel.c @@ -3257,7 +3257,7 @@ void sentinelInfoCommand(client *c) { addReplyBulkSds(c, info); } -/* Implements Sentinel verison of the ROLE command. The output is +/* Implements Sentinel version of the ROLE command. The output is * "sentinel" and the list of currently monitored master names. */ void sentinelRoleCommand(client *c) { dictIterator *di; diff --git a/src/sort.c b/src/sort.c index 7ddd37d95..668e5fad2 100644 --- a/src/sort.c +++ b/src/sort.c @@ -193,7 +193,7 @@ void sortCommand(client *c) { long limit_start = 0, limit_count = -1, start, end; int j, dontsort = 0, vectorlen; int getop = 0; /* GET operation counter */ - int int_convertion_error = 0; + int int_conversion_error = 0; int syntax_error = 0; robj *sortval, *sortby = NULL, *storekey = NULL; redisSortObject *vector; /* Resulting vector to sort */ @@ -469,7 +469,7 @@ void sortCommand(client *c) { if (eptr[0] != '\0' || errno == ERANGE || isnan(vector[j].u.score)) { - int_convertion_error = 1; + int_conversion_error = 1; } } else if (byval->encoding == OBJ_ENCODING_INT) { /* Don't need to decode the object if it's @@ -503,7 +503,7 @@ void sortCommand(client *c) { /* Send command output to the output buffer, performing the specified * GET/DEL/INCR/DECR operations if any. */ outputlen = getop ? getop*(end-start+1) : end-start+1; - if (int_convertion_error) { + if (int_conversion_error) { addReplyError(c,"One or more scores can't be converted into double"); } else if (storekey == NULL) { /* STORE option not specified, sent the sorting result to client */ diff --git a/src/t_zset.c b/src/t_zset.c index 7956f6e9c..ec7447161 100644 --- a/src/t_zset.c +++ b/src/t_zset.c @@ -507,7 +507,7 @@ static int zslParseRange(robj *min, robj *max, zrangespec *spec) { * + means the max string possible * * If the string is valid the *dest pointer is set to the redis object - * that will be used for the comparision, and ex will be set to 0 or 1 + * that will be used for the comparison, and ex will be set to 0 or 1 * respectively if the item is exclusive or inclusive. C_OK will be * returned. * diff --git a/src/util.c b/src/util.c index c1494e021..510082e6f 100644 --- a/src/util.c +++ b/src/util.c @@ -451,7 +451,7 @@ int string2ld(const char *s, size_t slen, long double *dp) { /* Convert a double to a string representation. Returns the number of bytes * required. The representation should always be parsable by strtod(3). * This function does not support human-friendly formatting like ld2string - * does. It is intented mainly to be used inside t_zset.c when writing scores + * does. It is intended mainly to be used inside t_zset.c when writing scores * into a ziplist representing a sorted set. */ int d2string(char *buf, size_t len, double value) { if (isnan(value)) { diff --git a/src/zmalloc.c b/src/zmalloc.c index da62447e1..0851f2aed 100644 --- a/src/zmalloc.c +++ b/src/zmalloc.c @@ -338,7 +338,7 @@ size_t zmalloc_get_private_dirty(void) { } /* Returns the size of physical memory (RAM) in bytes. - * It looks ugly, but this is the cleanest way to achive cross platform results. + * It looks ugly, but this is the cleanest way to achieve cross platform results. * Cleaned up from: * * http://nadeausoftware.com/articles/2012/09/c_c_tip_how_get_physical_memory_size_system