From 86ca9b25e22174ef6a5ce7b54b85b100bb4bc919 Mon Sep 17 00:00:00 2001 From: a2tt Date: Wed, 9 Mar 2022 20:58:23 +0900 Subject: [PATCH] fix typos (#10402) --- src/defrag.c | 2 +- src/listpack.c | 2 +- src/localtime.c | 2 +- src/networking.c | 4 ++-- src/rax.c | 4 ++-- src/server.c | 2 +- src/ziplist.c | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/defrag.c b/src/defrag.c index 6a4f9f633..a756f26b0 100644 --- a/src/defrag.c +++ b/src/defrag.c @@ -1196,7 +1196,7 @@ void activeDefragCycle(void) { cursor = dictScan(db->dict, cursor, defragScanCallback, defragDictBucketCallback, db); /* Once in 16 scan iterations, 512 pointer reallocations. or 64 keys - * (if we have a lot of pointers in one hash bucket or rehasing), + * (if we have a lot of pointers in one hash bucket or rehashing), * check if we reached the time limit. * But regardless, don't start a new db in this loop, this is because after * the last db we call defragOtherGlobals, which must be done in one cycle */ diff --git a/src/listpack.c b/src/listpack.c index 450976e2c..e651e4960 100644 --- a/src/listpack.c +++ b/src/listpack.c @@ -958,7 +958,7 @@ unsigned char *lpPrependInteger(unsigned char *lp, long long lval) { return lpInsertInteger(lp, lval, p, LP_BEFORE, NULL); } -/* Append the specified element 'ele' of length 'len' at the end of the +/* Append the specified element 'ele' of length 'size' at the end of the * listpack. It is implemented in terms of lpInsert(), so the return value is * the same as lpInsert(). */ unsigned char *lpAppend(unsigned char *lp, unsigned char *ele, uint32_t size) { diff --git a/src/localtime.c b/src/localtime.c index e2ac81f98..1cefdfa88 100644 --- a/src/localtime.c +++ b/src/localtime.c @@ -108,7 +108,7 @@ void nolocks_localtime(struct tm *tmp, time_t t, time_t tz, int dst) { int main(void) { /* Obtain timezone and daylight info. */ - tzset(); /* Now 'timezome' global is populated. */ + tzset(); /* Now 'timezone' global is populated. */ time_t t = time(NULL); struct tm *aux = localtime(&t); int daylight_active = aux->tm_isdst; diff --git a/src/networking.c b/src/networking.c index c9b4ef5e0..1c7f4b16c 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1940,7 +1940,7 @@ int writeToClient(client *c, int handler_installed) { if (!clientHasPendingReplies(c)) { c->sentlen = 0; /* Note that writeToClient() is called in a threaded way, but - * adDeleteFileEvent() is not thread safe: however writeToClient() + * aeDeleteFileEvent() is not thread safe: however writeToClient() * is always called with handler_installed set to 0 from threads * so we are fine. */ if (handler_installed) { @@ -2128,7 +2128,7 @@ int processInlineBuffer(client *c) { * we got some desynchronization in the protocol, for example * because of a PSYNC gone bad. * - * However the is an exception: masters may send us just a newline + * However there is an exception: masters may send us just a newline * to keep the connection active. */ if (querylen != 0 && c->flags & CLIENT_MASTER) { sdsfreesplitres(argv,argc); diff --git a/src/rax.c b/src/rax.c index 3e6829c6e..dd89ad929 100644 --- a/src/rax.c +++ b/src/rax.c @@ -905,9 +905,9 @@ int raxInsert(rax *rax, unsigned char *s, size_t len, void *data, void **old) { return raxGenericInsert(rax,s,len,data,old,1); } -/* Non overwriting insert function: this if an element with the same key +/* Non overwriting insert function: if an element with the same key * exists, the value is not updated and the function returns 0. - * This is a just a wrapper for raxGenericInsert(). */ + * This is just a wrapper for raxGenericInsert(). */ int raxTryInsert(rax *rax, unsigned char *s, size_t len, void *data, void **old) { return raxGenericInsert(rax,s,len,data,old,0); } diff --git a/src/server.c b/src/server.c index 49abf0748..d064433a0 100644 --- a/src/server.c +++ b/src/server.c @@ -1438,7 +1438,7 @@ void blockingOperationEnds() { } } -/* This function fill in the role of serverCron during RDB or AOF loading, and +/* This function fills in the role of serverCron during RDB or AOF loading, and * also during blocked scripts. * It attempts to do its duties at a similar rate as the configured server.hz, * and updates cronloops variable so that similarly to serverCron, the diff --git a/src/ziplist.c b/src/ziplist.c index d09c19e26..fa73cbf6f 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -608,7 +608,7 @@ int64_t zipLoadInteger(unsigned char *p, unsigned char encoding) { } /* Fills a struct with all information about an entry. - * This function is the "unsafe" alternative to the one blow. + * This function is the "unsafe" alternative to the one below. * Generally, all function that return a pointer to an element in the ziplist * will assert that this element is valid, so it can be freely used. * Generally functions such ziplistGet assume the input pointer is already