Commit 1caf0939 authored by guiquanz's avatar guiquanz Committed by antirez
Browse files

Fixed many typos.

Conflicts fixed, mainly because 2.8 has no cluster support / files:
	00-RELEASENOTES
	src/cluster.c
	src/crc16.c
	src/redis-trib.rb
	src/redis.h
parent ff1e4d22
...@@ -3,6 +3,4 @@ Redis 2.7 release notes ...@@ -3,6 +3,4 @@ Redis 2.7 release notes
This is the unstable version of Redis 2.8, currently work in progress. This is the unstable version of Redis 2.8, currently work in progress.
When it will be ready it will be releaed as Redis 2.8.0 When it will be ready for production, it will be releaed as Redis 2.8.0.
Unstable versions of Redis 2.8 will be called 2.7.0, 2.7.1, and so forth.
...@@ -246,7 +246,7 @@ slave-priority 100 ...@@ -246,7 +246,7 @@ slave-priority 100
# Set the max number of connected clients at the same time. By default # Set the max number of connected clients at the same time. By default
# this limit is set to 10000 clients, however if the Redis server is not # this limit is set to 10000 clients, however if the Redis server is not
# able ot configure the process file limit to allow for the specified limit # able to configure the process file limit to allow for the specified limit
# the max number of allowed clients is set to the current file limit # the max number of allowed clients is set to the current file limit
# minus 32 (as Redis reserves a few file descriptors for internal uses). # minus 32 (as Redis reserves a few file descriptors for internal uses).
# #
......
...@@ -71,7 +71,7 @@ sentinel parallel-syncs mymaster 1 ...@@ -71,7 +71,7 @@ sentinel parallel-syncs mymaster 1
# Default is 15 minutes. # Default is 15 minutes.
sentinel failover-timeout mymaster 900000 sentinel failover-timeout mymaster 900000
# SCRIPTS EXECTION # SCRIPTS EXECUTION
# #
# sentinel notification-script and sentinel reconfig-script are used in order # sentinel notification-script and sentinel reconfig-script are used in order
# to configure scripts that are called to notify the system administrator # to configure scripts that are called to notify the system administrator
......
...@@ -97,7 +97,7 @@ list *listAddNodeHead(list *list, void *value) ...@@ -97,7 +97,7 @@ list *listAddNodeHead(list *list, void *value)
return list; return list;
} }
/* Add a new node to the list, to tail, contaning the specified 'value' /* Add a new node to the list, to tail, containing the specified 'value'
* pointer as value. * pointer as value.
* *
* On error, NULL is returned and no operation is performed (i.e. the * On error, NULL is returned and no operation is performed (i.e. the
...@@ -308,7 +308,7 @@ listNode *listSearchKey(list *list, void *key) ...@@ -308,7 +308,7 @@ listNode *listSearchKey(list *list, void *key)
/* Return the element at the specified zero-based index /* Return the element at the specified zero-based index
* where 0 is the head, 1 is the element next to head * where 0 is the head, 1 is the element next to head
* and so on. Negative integers are used in order to count * and so on. Negative integers are used in order to count
* from the tail, -1 is the last element, -2 the penultimante * from the tail, -1 is the last element, -2 the penultimate
* and so on. If the index is out of range NULL is returned. */ * and so on. If the index is out of range NULL is returned. */
listNode *listIndex(list *list, long index) { listNode *listIndex(list *list, long index) {
listNode *n; listNode *n;
...@@ -330,7 +330,7 @@ void listRotate(list *list) { ...@@ -330,7 +330,7 @@ void listRotate(list *list) {
if (listLength(list) <= 1) return; if (listLength(list) <= 1) return;
/* Detatch current tail */ /* Detach current tail */
list->tail = tail->prev; list->tail = tail->prev;
list->tail->next = NULL; list->tail->next = NULL;
/* Move it as head */ /* Move it as head */
......
...@@ -309,7 +309,7 @@ static int processTimeEvents(aeEventLoop *eventLoop) { ...@@ -309,7 +309,7 @@ static int processTimeEvents(aeEventLoop *eventLoop) {
/* Process every pending time event, then every pending file event /* Process every pending time event, then every pending file event
* (that may be registered by time event callbacks just processed). * (that may be registered by time event callbacks just processed).
* Without special flags the function sleeps until some file event * Without special flags the function sleeps until some file event
* fires, or when the next time event occurrs (if any). * fires, or when the next time event occurs (if any).
* *
* If flags is 0, the function does nothing and returns. * If flags is 0, the function does nothing and returns.
* if flags has AE_ALL_EVENTS set, all the kind of events are processed. * if flags has AE_ALL_EVENTS set, all the kind of events are processed.
...@@ -356,7 +356,7 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags) ...@@ -356,7 +356,7 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
if (tvp->tv_usec < 0) tvp->tv_usec = 0; if (tvp->tv_usec < 0) tvp->tv_usec = 0;
} else { } else {
/* If we have to check for events but need to return /* If we have to check for events but need to return
* ASAP because of AE_DONT_WAIT we need to se the timeout * ASAP because of AE_DONT_WAIT we need to set the timeout
* to zero */ * to zero */
if (flags & AE_DONT_WAIT) { if (flags & AE_DONT_WAIT) {
tv.tv_sec = tv.tv_usec = 0; tv.tv_sec = tv.tv_usec = 0;
...@@ -395,7 +395,7 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags) ...@@ -395,7 +395,7 @@ int aeProcessEvents(aeEventLoop *eventLoop, int flags)
return processed; /* return the number of processed file/time events */ return processed; /* return the number of processed file/time events */
} }
/* Wait for millseconds until the given file descriptor becomes /* Wait for milliseconds until the given file descriptor becomes
* writable/readable/exception */ * writable/readable/exception */
int aeWait(int fd, int mask, long long milliseconds) { int aeWait(int fd, int mask, long long milliseconds) {
struct pollfd pfd; struct pollfd pfd;
......
...@@ -50,15 +50,15 @@ static int evport_debug = 0; ...@@ -50,15 +50,15 @@ static int evport_debug = 0;
* aeApiPoll, the corresponding file descriptors become dissociated from the * aeApiPoll, the corresponding file descriptors become dissociated from the
* port. This is necessary because poll events are level-triggered, so if the * port. This is necessary because poll events are level-triggered, so if the
* fd didn't become dissociated, it would immediately fire another event since * fd didn't become dissociated, it would immediately fire another event since
* the underlying state hasn't changed yet. We must reassociate the file * the underlying state hasn't changed yet. We must re-associate the file
* descriptor, but only after we know that our caller has actually read from it. * descriptor, but only after we know that our caller has actually read from it.
* The ae API does not tell us exactly when that happens, but we do know that * The ae API does not tell us exactly when that happens, but we do know that
* it must happen by the time aeApiPoll is called again. Our solution is to * it must happen by the time aeApiPoll is called again. Our solution is to
* keep track of the last fds returned by aeApiPoll and reassociate them next * keep track of the last fds returned by aeApiPoll and re-associate them next
* time aeApiPoll is invoked. * time aeApiPoll is invoked.
* *
* To summarize, in this module, each fd association is EITHER (a) represented * To summarize, in this module, each fd association is EITHER (a) represented
* only via the in-kernel assocation OR (b) represented by pending_fds and * only via the in-kernel association OR (b) represented by pending_fds and
* pending_masks. (b) is only true for the last fds we returned from aeApiPoll, * pending_masks. (b) is only true for the last fds we returned from aeApiPoll,
* and only until we enter aeApiPoll again (at which point we restore the * and only until we enter aeApiPoll again (at which point we restore the
* in-kernel association). * in-kernel association).
...@@ -164,7 +164,7 @@ static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) { ...@@ -164,7 +164,7 @@ static int aeApiAddEvent(aeEventLoop *eventLoop, int fd, int mask) {
* This fd was recently returned from aeApiPoll. It should be safe to * This fd was recently returned from aeApiPoll. It should be safe to
* assume that the consumer has processed that poll event, but we play * assume that the consumer has processed that poll event, but we play
* it safer by simply updating pending_mask. The fd will be * it safer by simply updating pending_mask. The fd will be
* reassociated as usual when aeApiPoll is called again. * re-associated as usual when aeApiPoll is called again.
*/ */
if (evport_debug) if (evport_debug)
fprintf(stderr, "aeApiAddEvent: adding to pending fd %d\n", fd); fprintf(stderr, "aeApiAddEvent: adding to pending fd %d\n", fd);
...@@ -228,7 +228,7 @@ static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int mask) { ...@@ -228,7 +228,7 @@ static void aeApiDelEvent(aeEventLoop *eventLoop, int fd, int mask) {
* ENOMEM is a potentially transient condition, but the kernel won't * ENOMEM is a potentially transient condition, but the kernel won't
* generally return it unless things are really bad. EAGAIN indicates * generally return it unless things are really bad. EAGAIN indicates
* we've reached an resource limit, for which it doesn't make sense to * we've reached an resource limit, for which it doesn't make sense to
* retry (counterintuitively). All other errors indicate a bug. In any * retry (counter-intuitively). All other errors indicate a bug. In any
* of these cases, the best we can do is to abort. * of these cases, the best we can do is to abort.
*/ */
abort(); /* will not return */ abort(); /* will not return */
...@@ -243,7 +243,7 @@ static int aeApiPoll(aeEventLoop *eventLoop, struct timeval *tvp) { ...@@ -243,7 +243,7 @@ static int aeApiPoll(aeEventLoop *eventLoop, struct timeval *tvp) {
port_event_t event[MAX_EVENT_BATCHSZ]; port_event_t event[MAX_EVENT_BATCHSZ];
/* /*
* If we've returned fd events before, we must reassociate them with the * If we've returned fd events before, we must re-associate them with the
* port now, before calling port_get(). See the block comment at the top of * port now, before calling port_get(). See the block comment at the top of
* this file for an explanation of why. * this file for an explanation of why.
*/ */
......
...@@ -61,7 +61,7 @@ int anetNonBlock(char *err, int fd) ...@@ -61,7 +61,7 @@ int anetNonBlock(char *err, int fd)
{ {
int flags; int flags;
/* Set the socket nonblocking. /* Set the socket non-blocking.
* Note that fcntl(2) for F_GETFL and F_SETFL can't be * Note that fcntl(2) for F_GETFL and F_SETFL can't be
* interrupted by a signal. */ * interrupted by a signal. */
if ((flags = fcntl(fd, F_GETFL)) == -1) { if ((flags = fcntl(fd, F_GETFL)) == -1) {
...@@ -132,7 +132,7 @@ static int anetCreateSocket(char *err, int domain) { ...@@ -132,7 +132,7 @@ static int anetCreateSocket(char *err, int domain) {
return ANET_ERR; return ANET_ERR;
} }
/* Make sure connection-intensive things like the redis benckmark /* Make sure connection-intensive things like the redis benchmark
* will be able to close/open sockets a zillion of times */ * will be able to close/open sockets a zillion of times */
if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) { if (setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
anetSetError(err, "setsockopt SO_REUSEADDR: %s", strerror(errno)); anetSetError(err, "setsockopt SO_REUSEADDR: %s", strerror(errno));
......
...@@ -385,7 +385,7 @@ void feedAppendOnlyFile(struct redisCommand *cmd, int dictid, robj **argv, int a ...@@ -385,7 +385,7 @@ void feedAppendOnlyFile(struct redisCommand *cmd, int dictid, robj **argv, int a
sds buf = sdsempty(); sds buf = sdsempty();
robj *tmpargv[3]; robj *tmpargv[3];
/* The DB this command was targetting is not the same as the last command /* The DB this command was targeting is not the same as the last command
* we appendend. To issue a SELECT command is needed. */ * we appendend. To issue a SELECT command is needed. */
if (dictid != server.aof_selected_db) { if (dictid != server.aof_selected_db) {
char seldb[64]; char seldb[64];
......
...@@ -74,7 +74,7 @@ static list *bio_jobs[REDIS_BIO_NUM_OPS]; ...@@ -74,7 +74,7 @@ static list *bio_jobs[REDIS_BIO_NUM_OPS];
static unsigned long long bio_pending[REDIS_BIO_NUM_OPS]; static unsigned long long bio_pending[REDIS_BIO_NUM_OPS];
/* This structure represents a background Job. It is only used locally to this /* This structure represents a background Job. It is only used locally to this
* file as the API deos not expose the internals at all. */ * file as the API does not expose the internals at all. */
struct bio_job { struct bio_job {
time_t time; /* Time at which the job was created. */ time_t time; /* Time at which the job was created. */
/* Job specific arguments pointers. If we need to pass more than three /* Job specific arguments pointers. If we need to pass more than three
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
* Helpers and low level bit functions. * Helpers and low level bit functions.
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
/* This helper function used by GETBIT / SETBIT parses the bit offset arguemnt /* This helper function used by GETBIT / SETBIT parses the bit offset argument
* making sure an error is returned if it is negative or if it overflows * making sure an error is returned if it is negative or if it overflows
* Redis 512 MB limit for the string value. */ * Redis 512 MB limit for the string value. */
static int getBitOffsetFromArgument(redisClient *c, robj *o, size_t *offset) { static int getBitOffsetFromArgument(redisClient *c, robj *o, size_t *offset) {
...@@ -189,7 +189,7 @@ void bitopCommand(redisClient *c) { ...@@ -189,7 +189,7 @@ void bitopCommand(redisClient *c) {
char *opname = c->argv[1]->ptr; char *opname = c->argv[1]->ptr;
robj *o, *targetkey = c->argv[2]; robj *o, *targetkey = c->argv[2];
long op, j, numkeys; long op, j, numkeys;
robj **objects; /* Array of soruce objects. */ robj **objects; /* Array of source objects. */
unsigned char **src; /* Array of source strings pointers. */ unsigned char **src; /* Array of source strings pointers. */
long *len, maxlen = 0; /* Array of length of src strings, and max len. */ long *len, maxlen = 0; /* Array of length of src strings, and max len. */
long minlen = 0; /* Min len among the input keys. */ long minlen = 0; /* Min len among the input keys. */
......
...@@ -333,7 +333,7 @@ void loadServerConfigFromString(char *config) { ...@@ -333,7 +333,7 @@ void loadServerConfigFromString(char *config) {
goto loaderr; goto loaderr;
} }
/* If the target command name is the emtpy string we just /* If the target command name is the empty string we just
* remove it from the command table. */ * remove it from the command table. */
retval = dictDelete(server.commands, argv[1]); retval = dictDelete(server.commands, argv[1]);
redisAssert(retval == DICT_OK); redisAssert(retval == DICT_OK);
...@@ -371,7 +371,7 @@ void loadServerConfigFromString(char *config) { ...@@ -371,7 +371,7 @@ void loadServerConfigFromString(char *config) {
soft = memtoll(argv[3],NULL); soft = memtoll(argv[3],NULL);
soft_seconds = atoi(argv[4]); soft_seconds = atoi(argv[4]);
if (soft_seconds < 0) { if (soft_seconds < 0) {
err = "Negative number of seconds in soft limt is invalid"; err = "Negative number of seconds in soft limit is invalid";
goto loaderr; goto loaderr;
} }
server.client_obuf_limits[class].hard_limit_bytes = hard; server.client_obuf_limits[class].hard_limit_bytes = hard;
...@@ -416,7 +416,7 @@ loaderr: ...@@ -416,7 +416,7 @@ loaderr:
* in the 'options' string to the config file before loading. * in the 'options' string to the config file before loading.
* *
* Both filename and options can be NULL, in such a case are considered * Both filename and options can be NULL, in such a case are considered
* emtpy. This way loadServerConfig can be used to just load a file or * empty. This way loadServerConfig can be used to just load a file or
* just load a string. */ * just load a string. */
void loadServerConfig(char *filename, char *options) { void loadServerConfig(char *filename, char *options) {
sds config = sdsempty(); sds config = sdsempty();
......
...@@ -44,7 +44,7 @@ robj *lookupKey(redisDb *db, robj *key) { ...@@ -44,7 +44,7 @@ robj *lookupKey(redisDb *db, robj *key) {
if (de) { if (de) {
robj *val = dictGetVal(de); robj *val = dictGetVal(de);
/* Update the access time for the aging algorithm. /* Update the access time for the ageing algorithm.
* Don't do it if we have a saving child, as this will trigger * Don't do it if we have a saving child, as this will trigger
* a copy on write madness. */ * a copy on write madness. */
if (server.rdb_child_pid == -1 && server.aof_child_pid == -1) if (server.rdb_child_pid == -1 && server.aof_child_pid == -1)
...@@ -85,7 +85,7 @@ robj *lookupKeyWriteOrReply(redisClient *c, robj *key, robj *reply) { ...@@ -85,7 +85,7 @@ robj *lookupKeyWriteOrReply(redisClient *c, robj *key, robj *reply) {
} }
/* Add the key to the DB. It's up to the caller to increment the reference /* Add the key to the DB. It's up to the caller to increment the reference
* counte of the value if needed. * counter of the value if needed.
* *
* The program is aborted if the key already exists. */ * The program is aborted if the key already exists. */
void dbAdd(redisDb *db, robj *key, robj *val) { void dbAdd(redisDb *db, robj *key, robj *val) {
...@@ -538,7 +538,7 @@ int expireIfNeeded(redisDb *db, robj *key) { ...@@ -538,7 +538,7 @@ int expireIfNeeded(redisDb *db, robj *key) {
* for *AT variants of the command, or the current time for relative expires). * for *AT variants of the command, or the current time for relative expires).
* *
* unit is either UNIT_SECONDS or UNIT_MILLISECONDS, and is only used for * unit is either UNIT_SECONDS or UNIT_MILLISECONDS, and is only used for
* the argv[2] parameter. The basetime is always specified in milliesconds. */ * the argv[2] parameter. The basetime is always specified in milliseconds. */
void expireGenericCommand(redisClient *c, long long basetime, int unit) { void expireGenericCommand(redisClient *c, long long basetime, int unit) {
dictEntry *de; dictEntry *de;
robj *key = c->argv[1], *param = c->argv[2]; robj *key = c->argv[1], *param = c->argv[2];
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
/* ================================= Debugging ============================== */ /* ================================= Debugging ============================== */
/* Compute the sha1 of string at 's' with 'len' bytes long. /* Compute the sha1 of string at 's' with 'len' bytes long.
* The SHA1 is then xored againt the string pointed by digest. * The SHA1 is then xored against the string pointed by digest.
* Since xor is commutative, this operation is used in order to * Since xor is commutative, this operation is used in order to
* "add" digests relative to unordered elements. * "add" digests relative to unordered elements.
* *
...@@ -69,7 +69,7 @@ void xorObjectDigest(unsigned char *digest, robj *o) { ...@@ -69,7 +69,7 @@ void xorObjectDigest(unsigned char *digest, robj *o) {
} }
/* This function instead of just computing the SHA1 and xoring it /* This function instead of just computing the SHA1 and xoring it
* against diget, also perform the digest of "digest" itself and * against digest, also perform the digest of "digest" itself and
* replace the old value with the new one. * replace the old value with the new one.
* *
* So the final digest will be: * So the final digest will be:
......
...@@ -610,7 +610,7 @@ static int _dictExpandIfNeeded(dict *d) ...@@ -610,7 +610,7 @@ static int _dictExpandIfNeeded(dict *d)
/* Incremental rehashing already in progress. Return. */ /* Incremental rehashing already in progress. Return. */
if (dictIsRehashing(d)) return DICT_OK; if (dictIsRehashing(d)) return DICT_OK;
/* If the hash table is empty expand it to the intial size. */ /* If the hash table is empty expand it to the initial size. */
if (d->ht[0].size == 0) return dictExpand(d, DICT_HT_INITIAL_SIZE); if (d->ht[0].size == 0) return dictExpand(d, DICT_HT_INITIAL_SIZE);
/* If we reached the 1:1 ratio, and we are allowed to resize the hash /* If we reached the 1:1 ratio, and we are allowed to resize the hash
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
/* /*
* Avoid assigning values to errno variable? for some embedding purposes * Avoid assigning values to errno variable? for some embedding purposes
* (linux kernel for example), this is neccessary. NOTE: this breaks * (linux kernel for example), this is necessary. NOTE: this breaks
* the documentation in lzf.h. * the documentation in lzf.h.
*/ */
#ifndef AVOID_ERRNO #ifndef AVOID_ERRNO
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
#endif #endif
/* /*
* Wether to pass the LZF_STATE variable as argument, or allocate it * Whether to pass the LZF_STATE variable as argument, or allocate it
* on the stack. For small-stack environments, define this to 1. * on the stack. For small-stack environments, define this to 1.
* NOTE: this breaks the prototype in lzf.h. * NOTE: this breaks the prototype in lzf.h.
*/ */
...@@ -110,11 +110,11 @@ ...@@ -110,11 +110,11 @@
#endif #endif
/* /*
* Wether to add extra checks for input validity in lzf_decompress * Whether to add extra checks for input validity in lzf_decompress
* and return EINVAL if the input stream has been corrupted. This * and return EINVAL if the input stream has been corrupted. This
* only shields against overflowing the input buffer and will not * only shields against overflowing the input buffer and will not
* detect most corrupted streams. * detect most corrupted streams.
* This check is not normally noticable on modern hardware * This check is not normally noticeable on modern hardware
* (<1% slowdown), but might slow down older cpus considerably. * (<1% slowdown), but might slow down older cpus considerably.
*/ */
#ifndef CHECK_INPUT #ifndef CHECK_INPUT
......
...@@ -4,7 +4,7 @@ GIT_DIRTY=`git diff 2> /dev/null | wc -l` ...@@ -4,7 +4,7 @@ GIT_DIRTY=`git diff 2> /dev/null | wc -l`
BUILD_ID=`uname -n`"-"`date +%s` BUILD_ID=`uname -n`"-"`date +%s`
test -f release.h || touch release.h test -f release.h || touch release.h
(cat release.h | grep SHA1 | grep $GIT_SHA1) && \ (cat release.h | grep SHA1 | grep $GIT_SHA1) && \
(cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already uptodate (cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already up-to-date
echo "#define REDIS_GIT_SHA1 \"$GIT_SHA1\"" > release.h echo "#define REDIS_GIT_SHA1 \"$GIT_SHA1\"" > release.h
echo "#define REDIS_GIT_DIRTY \"$GIT_DIRTY\"" >> release.h echo "#define REDIS_GIT_DIRTY \"$GIT_DIRTY\"" >> release.h
echo "#define REDIS_BUILD_ID \"$BUILD_ID\"" >> release.h echo "#define REDIS_BUILD_ID \"$BUILD_ID\"" >> release.h
......
...@@ -102,7 +102,7 @@ void discardCommand(redisClient *c) { ...@@ -102,7 +102,7 @@ void discardCommand(redisClient *c) {
} }
/* Send a MULTI command to all the slaves and AOF file. Check the execCommand /* Send a MULTI command to all the slaves and AOF file. Check the execCommand
* implememntation for more information. */ * implementation for more information. */
void execCommandReplicateMulti(redisClient *c) { void execCommandReplicateMulti(redisClient *c) {
robj *multistring = createStringObject("MULTI",5); robj *multistring = createStringObject("MULTI",5);
...@@ -223,7 +223,7 @@ void watchForKey(redisClient *c, robj *key) { ...@@ -223,7 +223,7 @@ void watchForKey(redisClient *c, robj *key) {
incrRefCount(key); incrRefCount(key);
} }
listAddNodeTail(clients,c); listAddNodeTail(clients,c);
/* Add the new key to the lits of keys watched by this client */ /* Add the new key to the list of keys watched by this client */
wk = zmalloc(sizeof(*wk)); wk = zmalloc(sizeof(*wk));
wk->key = key; wk->key = key;
wk->db = c->db; wk->db = c->db;
......
...@@ -378,7 +378,7 @@ void *addDeferredMultiBulkLength(redisClient *c) { ...@@ -378,7 +378,7 @@ void *addDeferredMultiBulkLength(redisClient *c) {
return listLast(c->reply); return listLast(c->reply);
} }
/* Populate the length object and try glueing it to the next chunk. */ /* Populate the length object and try gluing it to the next chunk. */
void setDeferredMultiBulkLength(redisClient *c, void *node, long length) { void setDeferredMultiBulkLength(redisClient *c, void *node, long length) {
listNode *ln = (listNode*)node; listNode *ln = (listNode*)node;
robj *len, *next; robj *len, *next;
...@@ -404,7 +404,7 @@ void setDeferredMultiBulkLength(redisClient *c, void *node, long length) { ...@@ -404,7 +404,7 @@ void setDeferredMultiBulkLength(redisClient *c, void *node, long length) {
asyncCloseClientOnOutputBufferLimitReached(c); asyncCloseClientOnOutputBufferLimitReached(c);
} }
/* Add a duble as a bulk reply */ /* Add a double as a bulk reply */
void addReplyDouble(redisClient *c, double d) { void addReplyDouble(redisClient *c, double d) {
char dbuf[128], sbuf[128]; char dbuf[128], sbuf[128];
int dlen, slen; int dlen, slen;
...@@ -526,7 +526,7 @@ static void acceptCommonHandler(int fd, int flags) { ...@@ -526,7 +526,7 @@ static void acceptCommonHandler(int fd, int flags) {
} }
/* If maxclient directive is set and this is one client more... close the /* If maxclient directive is set and this is one client more... close the
* connection. Note that we create the client instead to check before * connection. Note that we create the client instead to check before
* for this condition, since now the socket is already set in nonblocking * for this condition, since now the socket is already set in non-blocking
* mode and we can send an error for free using the Kernel I/O */ * mode and we can send an error for free using the Kernel I/O */
if (listLength(server.clients) > server.maxclients) { if (listLength(server.clients) > server.maxclients) {
char *err = "-ERR max number of clients reached\r\n"; char *err = "-ERR max number of clients reached\r\n";
...@@ -941,7 +941,7 @@ int processMultibulkBuffer(redisClient *c) { ...@@ -941,7 +941,7 @@ int processMultibulkBuffer(redisClient *c) {
/* Not enough data (+2 == trailing \r\n) */ /* Not enough data (+2 == trailing \r\n) */
break; break;
} else { } else {
/* Optimization: if the buffer contanins JUST our bulk element /* Optimization: if the buffer containns JUST our bulk element
* instead of creating a new object by *copying* the sds we * instead of creating a new object by *copying* the sds we
* just use the current sds string. */ * just use the current sds string. */
if (pos == 0 && if (pos == 0 &&
......
...@@ -72,7 +72,7 @@ robj *createStringObjectFromLongDouble(long double value) { ...@@ -72,7 +72,7 @@ robj *createStringObjectFromLongDouble(long double value) {
int len; int len;
/* We use 17 digits precision since with 128 bit floats that precision /* We use 17 digits precision since with 128 bit floats that precision
* after rouding is able to represent most small decimal numbers in a way * after rounding is able to represent most small decimal numbers in a way
* that is "non surprising" for the user (that is, most small decimal * that is "non surprising" for the user (that is, most small decimal
* numbers will be represented in a way that when converted back into * numbers will be represented in a way that when converted back into
* a string are exactly the same as what the user typed.) */ * a string are exactly the same as what the user typed.) */
......
...@@ -117,7 +117,7 @@ int pubsubUnsubscribeChannel(redisClient *c, robj *channel, int notify) { ...@@ -117,7 +117,7 @@ int pubsubUnsubscribeChannel(redisClient *c, robj *channel, int notify) {
return retval; return retval;
} }
/* Subscribe a client to a pattern. Returns 1 if the operation succeeded, or 0 if the clinet was already subscribed to that pattern. */ /* Subscribe a client to a pattern. Returns 1 if the operation succeeded, or 0 if the client was already subscribed to that pattern. */
int pubsubSubscribePattern(redisClient *c, robj *pattern) { int pubsubSubscribePattern(redisClient *c, robj *pattern) {
int retval = 0; int retval = 0;
......
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