summaryrefslogtreecommitdiff
path: root/src/sds.c
diff options
context:
space:
mode:
authorBinbin <binloveplay1314@qq.com>2021-06-10 20:39:33 +0800
committerGitHub <noreply@github.com>2021-06-10 15:39:33 +0300
commit0bfccc55e2df349104b34608365dc17db8e0a749 (patch)
tree1861554f79d98e4c5352d879b2e08979e69ba2f1 /src/sds.c
parent8a86bca5ed09094b561284fcb5b1fc416a4016dc (diff)
downloadredis-0bfccc55e2df349104b34608365dc17db8e0a749.tar.gz
Fixed some typos, add a spell check ci and others minor fix (#8890)
This PR adds a spell checker CI action that will fail future PRs if they introduce typos and spelling mistakes. This spell checker is based on blacklist of common spelling mistakes, so it will not catch everything, but at least it is also unlikely to cause false positives. Besides that, the PR also fixes many spelling mistakes and types, not all are a result of the spell checker we use. Here's a summary of other changes: 1. Scanned the entire source code and fixes all sorts of typos and spelling mistakes (including missing or extra spaces). 2. Outdated function / variable / argument names in comments 3. Fix outdated keyspace masks error log when we check `config.notify-keyspace-events` in loadServerConfigFromString. 4. Trim the white space at the end of line in `module.c`. Check: https://github.com/redis/redis/pull/7751 5. Some outdated https link URLs. 6. Fix some outdated comment. Such as: - In README: about the rdb, we used to said create a `thread`, change to `process` - dbRandomKey function coment (about the dictGetRandomKey, change to dictGetFairRandomKey) - notifyKeyspaceEvent fucntion comment (add type arg) - Some others minor fix in comment (Most of them are incorrectly quoted by variable names) 7. Modified the error log so that users can easily distinguish between TCP and TLS in `changeBindAddr`
Diffstat (limited to 'src/sds.c')
-rw-r--r--src/sds.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sds.c b/src/sds.c
index 2addd56a5..17cd6ae69 100644
--- a/src/sds.c
+++ b/src/sds.c
@@ -92,7 +92,7 @@ static inline size_t sdsTypeMaxSize(char type) {
* If NULL is used for 'init' the string is initialized with zero bytes.
* If SDS_NOINIT is used, the buffer is left uninitialized;
*
- * The string is always null-termined (all the sds strings are, always) so
+ * The string is always null-terminated (all the sds strings are, always) so
* even if you create an sds string with:
*
* mystring = sdsnewlen("abc",3);
@@ -469,7 +469,7 @@ sds sdscpylen(sds s, const char *t, size_t len) {
return s;
}
-/* Like sdscpylen() but 't' must be a null-termined string so that the length
+/* Like sdscpylen() but 't' must be a null-terminated string so that the length
* of the string is obtained with strlen(). */
sds sdscpy(sds s, const char *t) {
return sdscpylen(s, t, strlen(t));
@@ -731,7 +731,7 @@ sds sdscatfmt(sds s, char const *fmt, ...) {
}
/* Remove the part of the string from left and from right composed just of
- * contiguous characters found in 'cset', that is a null terminted C string.
+ * contiguous characters found in 'cset', that is a null terminated C string.
*
* After the call, the modified sds string is no longer valid and all the
* references must be substituted with the new pointer returned by the call.
@@ -1179,7 +1179,7 @@ sds sdstemplate(const char *template, sdstemplate_callback_t cb_func, void *cb_a
res = sdscat(res, p);
break;
} else if (sv > p) {
- /* Found: copy anything up to the begining of the variable */
+ /* Found: copy anything up to the beginning of the variable */
res = sdscatlen(res, p, sv - p);
}