summaryrefslogtreecommitdiff
path: root/src/quicklist.c
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-05-10 19:02:25 +0800
committerGitHub <noreply@github.com>2021-05-10 14:02:25 +0300
commitfb66c1b58cbf84ad5372a2c793399d9301564da5 (patch)
treebe97c3318a7b2874e22441733b13a675dfb98288 /src/quicklist.c
parent4d4db9797fd684185dae476747069b54243f1e83 (diff)
downloadredis-fb66c1b58cbf84ad5372a2c793399d9301564da5.tar.gz
Fix typos, and consistent function argument names in quicklist (#8915)
Also fixes a chance for compilation error if REDIS_TEST_VERBOSE would be used.
Diffstat (limited to 'src/quicklist.c')
-rw-r--r--src/quicklist.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/quicklist.c b/src/quicklist.c
index 5a1e41dcc..636a9e296 100644
--- a/src/quicklist.c
+++ b/src/quicklist.c
@@ -192,7 +192,7 @@ REDIS_STATIC int __quicklistCompressNode(quicklistNode *node) {
if (((lzf->sz = lzf_compress(node->zl, node->sz, lzf->compressed,
node->sz)) == 0) ||
lzf->sz + MIN_COMPRESS_IMPROVE >= node->sz) {
- /* lzf_compress aborts/rejects compression if value not compressable. */
+ /* lzf_compress aborts/rejects compression if value not compressible. */
zfree(lzf);
return 0;
}
@@ -240,7 +240,7 @@ REDIS_STATIC int __quicklistDecompressNode(quicklistNode *node) {
} \
} while (0)
-/* Force node to not be immediately re-compresable */
+/* Force node to not be immediately re-compressible */
#define quicklistDecompressNodeForUse(_node) \
do { \
if ((_node) && (_node)->encoding == QUICKLIST_NODE_ENCODING_LZF) { \
@@ -668,7 +668,7 @@ void quicklistDelEntry(quicklistIter *iter, quicklistEntry *entry) {
* doesn't move again because:
* - [1, 2, 3] => delete offset 1 => [1, 3]: next element still offset 1
* - [1, 2, 3] => delete offset 0 => [2, 3]: next element still offset 0
- * if we deleted the last element at offet N and now
+ * if we deleted the last element at offset N and now
* length of this ziplist is N-1, the next call into
* quicklistNext() will jump to the next node. */
}
@@ -1138,7 +1138,7 @@ int quicklistNext(quicklistIter *iter, quicklistEntry *entry) {
entry->node = iter->current;
if (!iter->current) {
- D("Returning because current node is NULL")
+ D("Returning because current node is NULL");
return 0;
}
@@ -1438,7 +1438,7 @@ void quicklistPush(quicklist *quicklist, void *value, const size_t sz,
* Returns 0 on failure (reached the maximum supported number of bookmarks).
* NOTE: use short simple names, so that string compare on find is quick.
* NOTE: bookmark creation may re-allocate the quicklist, so the input pointer
- may change and it's the caller responsibilty to update the reference.
+ may change and it's the caller responsibility to update the reference.
*/
int quicklistBookmarkCreate(quicklist **ql_ref, const char *name, quicklistNode *node) {
quicklist *ql = *ql_ref;