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
2edcafb3
Commit
2edcafb3
authored
Jul 02, 2018
by
antirez
Browse files
addReplySubSyntaxError() renamed to addReplySubcommandSyntaxError().
parent
bc6a0045
Changes
12
Hide whitespace changes
Inline
Side-by-side
src/cluster.c
View file @
2edcafb3
...
...
@@ -4746,7 +4746,7 @@ NULL
clusterReset
(
hard
);
addReply
(
c
,
shared
.
ok
);
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
return
;
}
}
...
...
src/config.c
View file @
2edcafb3
...
...
@@ -2168,7 +2168,7 @@ NULL
addReply
(
c
,
shared
.
ok
);
}
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
return
;
}
}
src/debug.c
View file @
2edcafb3
...
...
@@ -582,7 +582,7 @@ NULL
clearReplicationId2
();
addReply
(
c
,
shared
.
ok
);
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
return
;
}
}
...
...
src/module.c
View file @
2edcafb3
...
...
@@ -4559,7 +4559,7 @@ NULL
}
dictReleaseIterator
(
di
);
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
return
;
}
}
...
...
src/networking.c
View file @
2edcafb3
...
...
@@ -565,13 +565,13 @@ void addReplyHelp(client *c, const char **help) {
/* Add a suggestive error reply.
* This function is typically invoked by from commands that support
* subcommands in response to an unknown subcommand or argument error. */
void
addReplySubSyntaxError
(
client
*
c
)
{
void
addReplySub
command
SyntaxError
(
client
*
c
)
{
sds
cmd
=
sdsnew
((
char
*
)
c
->
argv
[
0
]
->
ptr
);
sdstoupper
(
cmd
);
addReplyErrorFormat
(
c
,
"Unknown subcommand or wrong number of arguments for '%s'. Try %s HELP."
,
c
->
argv
[
1
]
->
ptr
,
cmd
);
sdsfree
(
cmd
);
sdsfree
(
cmd
);
}
/* Copy 'src' client output buffers into 'dst' client output buffers.
...
...
src/object.c
View file @
2edcafb3
...
...
@@ -1254,7 +1254,7 @@ NULL
* when the key is read or overwritten. */
addReplyLongLong
(
c
,
LFUDecrAndReturn
(
o
));
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
...
...
src/pubsub.c
View file @
2edcafb3
...
...
@@ -372,6 +372,6 @@ NULL
/* PUBSUB NUMPAT */
addReplyLongLong
(
c
,
listLength
(
server
.
pubsub_patterns
));
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
src/scripting.c
View file @
2edcafb3
...
...
@@ -1514,7 +1514,7 @@ NULL
return
;
}
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
...
...
src/server.c
View file @
2edcafb3
...
...
@@ -2876,7 +2876,7 @@ NULL
getKeysFreeResult
(
keys
);
}
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
...
...
src/server.h
View file @
2edcafb3
...
...
@@ -1413,7 +1413,7 @@ void addReplyHumanLongDouble(client *c, long double d);
void
addReplyLongLong
(
client
*
c
,
long
long
ll
);
void
addReplyMultiBulkLen
(
client
*
c
,
long
length
);
void
addReplyHelp
(
client
*
c
,
const
char
**
help
);
void
addReplySubSyntaxError
(
client
*
c
);
void
addReplySub
command
SyntaxError
(
client
*
c
);
void
copyClientOutputBuffer
(
client
*
dst
,
client
*
src
);
size_t
sdsZmallocSize
(
sds
s
);
size_t
getStringObjectSdsUsedMemory
(
robj
*
o
);
...
...
src/slowlog.c
View file @
2edcafb3
...
...
@@ -187,6 +187,6 @@ NULL
}
setDeferredMultiBulkLength
(
c
,
totentries
,
sent
);
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
src/t_stream.c
View file @
2edcafb3
...
...
@@ -1650,7 +1650,7 @@ NULL
}
else
if
(
!
strcasecmp
(
opt
,
"HELP"
))
{
addReplyHelp
(
c
,
help
);
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
...
...
@@ -2277,7 +2277,7 @@ NULL
STREAM_RWR_RAWENTRIES
,
NULL
);
if
(
!
count
)
addReply
(
c
,
shared
.
nullbulk
);
}
else
{
addReplySubSyntaxError
(
c
);
addReplySub
command
SyntaxError
(
c
);
}
}
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