From e2f6ee239c9c0cedfccee1db77c95e673fe6fe04 Mon Sep 17 00:00:00 2001 From: charsyam Date: Wed, 28 Oct 2015 02:19:24 +0900 Subject: [PATCH] fixing typos --- async.c | 2 +- dict.c | 4 ++-- hiredis.c | 6 +++--- hiredis.h | 2 +- read.h | 2 +- sds.c | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/async.c b/async.c index acca29a..d955203 100644 --- a/async.c +++ b/async.c @@ -489,7 +489,7 @@ void redisProcessCallbacks(redisAsyncContext *ac) { } /* Internal helper function to detect socket status the first time a read or - * write event fires. When connecting was not succesful, the connect callback + * write event fires. When connecting was not successful, the connect callback * is called with a REDIS_ERR status and the context is free'd. */ static int __redisAsyncHandleConnect(redisAsyncContext *ac) { redisContext *c = &(ac->c); diff --git a/dict.c b/dict.c index 79b1041..e17a625 100644 --- a/dict.c +++ b/dict.c @@ -161,7 +161,7 @@ static int dictReplace(dict *ht, 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(ht, key, val) == DICT_OK) return 1; /* It already exists, get the entry */ @@ -293,7 +293,7 @@ static void dictReleaseIterator(dictIterator *iter) { /* Expand the hash table if needed */ static int _dictExpandIfNeeded(dict *ht) { - /* 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 the table is "full" dobule its size. */ if (ht->size == 0) return dictExpand(ht, DICT_HT_INITIAL_SIZE); diff --git a/hiredis.c b/hiredis.c index 73d0251..2b876d9 100644 --- a/hiredis.c +++ b/hiredis.c @@ -822,10 +822,10 @@ int redisBufferRead(redisContext *c) { /* Write the output buffer to the socket. * * Returns REDIS_OK when the buffer is empty, or (a part of) the buffer was - * succesfully written to the socket. When the buffer is empty after the + * successfully written to the socket. When the buffer is empty after the * write operation, "done" is set to 1 (if given). * - * Returns REDIS_ERR if an error occured trying to write and sets + * Returns REDIS_ERR if an error occurred trying to write and sets * c->errstr to hold the appropriate error string. */ int redisBufferWrite(redisContext *c, int *done) { @@ -984,7 +984,7 @@ int redisAppendCommandArgv(redisContext *c, int argc, const char **argv, const s * context is non-blocking, the "reply" pointer will not be used and the * command is simply appended to the write buffer. * - * Returns the reply when a reply was succesfully retrieved. Returns NULL + * Returns the reply when a reply was successfully retrieved. Returns NULL * otherwise. When NULL is returned in a blocking context, the error field * in the context will be set. */ diff --git a/hiredis.h b/hiredis.h index fe267b9..edba658 100644 --- a/hiredis.h +++ b/hiredis.h @@ -179,7 +179,7 @@ redisContext *redisConnectFd(int fd); * host, ip (or path), timeout and bind address are reused, * flags are used unmodified from the existing context. * - * Returns REDIS_OK on successfull connect or REDIS_ERR otherwise. + * Returns REDIS_OK on successful connect or REDIS_ERR otherwise. */ int redisReconnect(redisContext *c); diff --git a/read.h b/read.h index 635a872..180e6c6 100644 --- a/read.h +++ b/read.h @@ -38,7 +38,7 @@ #define REDIS_OK 0 /* When an error occurs, the err flag in a context is set to hold the type of - * error that occured. REDIS_ERR_IO means there was an I/O error and you + * error that occurred. REDIS_ERR_IO means there was an I/O error and you * should use the "errno" variable to find out what is wrong. * For other values, the "errstr" field will hold a description. */ #define REDIS_ERR_IO 1 /* Error in read or write */ diff --git a/sds.c b/sds.c index 5d55b77..f01247d 100644 --- a/sds.c +++ b/sds.c @@ -293,7 +293,7 @@ sds sdscpy(sds s, const char *t) { * conversion. 's' must point to a string with room for at least * SDS_LLSTR_SIZE bytes. * - * The function returns the lenght of the null-terminated string + * The function returns the length of the null-terminated string * representation stored at 's'. */ #define SDS_LLSTR_SIZE 21 int sdsll2str(char *s, long long value) {