Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
69871760
Unverified
Commit
69871760
authored
Oct 28, 2020
by
sundb
Committed by
GitHub
Oct 28, 2020
Browse files
docs: Fix some typos in comments and log messge (#7975)
parent
39436b21
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/childinfo.c
View file @
69871760
...
@@ -36,7 +36,7 @@
...
@@ -36,7 +36,7 @@
void
openChildInfoPipe
(
void
)
{
void
openChildInfoPipe
(
void
)
{
if
(
pipe
(
server
.
child_info_pipe
)
==
-
1
)
{
if
(
pipe
(
server
.
child_info_pipe
)
==
-
1
)
{
/* On error our two file descriptors should be still set to -1,
/* On error our two file descriptors should be still set to -1,
* but we call anyway clo
e
sChildInfoPipe() since can't hurt. */
* but we call anyway clos
e
ChildInfoPipe() since can't hurt. */
closeChildInfoPipe
();
closeChildInfoPipe
();
}
else
if
(
anetNonBlock
(
NULL
,
server
.
child_info_pipe
[
0
])
!=
ANET_OK
)
{
}
else
if
(
anetNonBlock
(
NULL
,
server
.
child_info_pipe
[
0
])
!=
ANET_OK
)
{
closeChildInfoPipe
();
closeChildInfoPipe
();
...
...
src/db.c
View file @
69871760
...
@@ -1691,7 +1691,7 @@ void slotToKeyFlush(void) {
...
@@ -1691,7 +1691,7 @@ void slotToKeyFlush(void) {
sizeof
(
server
.
cluster
->
slots_keys_count
));
sizeof
(
server
.
cluster
->
slots_keys_count
));
}
}
/* P
u
pulate the specified array of objects with keys in the specified slot.
/* P
o
pulate the specified array of objects with keys in the specified slot.
* New objects are returned to represent keys, it's up to the caller to
* New objects are returned to represent keys, it's up to the caller to
* decrement the reference count to release the keys names. */
* decrement the reference count to release the keys names. */
unsigned
int
getKeysInSlot
(
unsigned
int
hashslot
,
robj
**
keys
,
unsigned
int
count
)
{
unsigned
int
getKeysInSlot
(
unsigned
int
hashslot
,
robj
**
keys
,
unsigned
int
count
)
{
...
...
src/dict.c
View file @
69871760
...
@@ -759,7 +759,7 @@ dictEntry *dictGetFairRandomKey(dict *d) {
...
@@ -759,7 +759,7 @@ dictEntry *dictGetFairRandomKey(dict *d) {
/* Note that dictGetSomeKeys() may return zero elements in an unlucky
/* Note that dictGetSomeKeys() may return zero elements in an unlucky
* run() even if there are actually elements inside the hash table. So
* run() even if there are actually elements inside the hash table. So
* when we get zero, we call the true dictGetRandomKey() that will always
* when we get zero, we call the true dictGetRandomKey() that will always
* yeld the element if the hash table has at least one. */
* y
i
eld the element if the hash table has at least one. */
if
(
count
==
0
)
return
dictGetRandomKey
(
d
);
if
(
count
==
0
)
return
dictGetRandomKey
(
d
);
unsigned
int
idx
=
rand
()
%
count
;
unsigned
int
idx
=
rand
()
%
count
;
return
entries
[
idx
];
return
entries
[
idx
];
...
...
src/rdb.c
View file @
69871760
...
@@ -1419,7 +1419,7 @@ int rdbSaveBackground(char *filename, rdbSaveInfo *rsi) {
...
@@ -1419,7 +1419,7 @@ int rdbSaveBackground(char *filename, rdbSaveInfo *rsi) {
/* Note that we may call this function in signal handle 'sigShutdownHandler',
/* Note that we may call this function in signal handle 'sigShutdownHandler',
* so we need guarantee all functions we call are async-signal-safe.
* so we need guarantee all functions we call are async-signal-safe.
* If we call this function from signal handle, we won't call bg_unlik that
* If we call this function from signal handle, we won't call bg_unli
n
k that
* is not async-signal-safe. */
* is not async-signal-safe. */
void
rdbRemoveTempFile
(
pid_t
childpid
,
int
from_signal
)
{
void
rdbRemoveTempFile
(
pid_t
childpid
,
int
from_signal
)
{
char
tmpfile
[
256
];
char
tmpfile
[
256
];
...
@@ -1892,7 +1892,7 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, sds key) {
...
@@ -1892,7 +1892,7 @@ robj *rdbLoadObject(int rdbtype, rio *rdb, sds key) {
return
NULL
;
return
NULL
;
}
}
if
(
!
raxInsert
(
cgroup
->
pel
,
rawid
,
sizeof
(
rawid
),
nack
,
NULL
))
if
(
!
raxInsert
(
cgroup
->
pel
,
rawid
,
sizeof
(
rawid
),
nack
,
NULL
))
rdbExitReportCorruptRDB
(
"Duplicated gobal PEL entry "
rdbExitReportCorruptRDB
(
"Duplicated g
l
obal PEL entry "
"loading stream consumer group"
);
"loading stream consumer group"
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment