mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Update incrDecrCommand to use addReplyLongLong (#9188)
Update incrDecrCommand to use addReplyLongLong
This commit is contained in:
parent
aa139e2f02
commit
8f59f131e5
@ -2479,7 +2479,6 @@ void createSharedObjects(void) {
|
|||||||
shared.queued = createObject(OBJ_STRING,sdsnew("+QUEUED\r\n"));
|
shared.queued = createObject(OBJ_STRING,sdsnew("+QUEUED\r\n"));
|
||||||
shared.emptyscan = createObject(OBJ_STRING,sdsnew("*2\r\n$1\r\n0\r\n*0\r\n"));
|
shared.emptyscan = createObject(OBJ_STRING,sdsnew("*2\r\n$1\r\n0\r\n*0\r\n"));
|
||||||
shared.space = createObject(OBJ_STRING,sdsnew(" "));
|
shared.space = createObject(OBJ_STRING,sdsnew(" "));
|
||||||
shared.colon = createObject(OBJ_STRING,sdsnew(":"));
|
|
||||||
shared.plus = createObject(OBJ_STRING,sdsnew("+"));
|
shared.plus = createObject(OBJ_STRING,sdsnew("+"));
|
||||||
|
|
||||||
/* Shared command error responses */
|
/* Shared command error responses */
|
||||||
|
@ -1025,7 +1025,7 @@ struct sentinelConfig {
|
|||||||
|
|
||||||
struct sharedObjectsStruct {
|
struct sharedObjectsStruct {
|
||||||
robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *pong, *space,
|
robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *pong, *space,
|
||||||
*colon, *queued, *null[4], *nullarray[4], *emptymap[4], *emptyset[4],
|
*queued, *null[4], *nullarray[4], *emptymap[4], *emptyset[4],
|
||||||
*emptyarray, *wrongtypeerr, *nokeyerr, *syntaxerr, *sameobjecterr,
|
*emptyarray, *wrongtypeerr, *nokeyerr, *syntaxerr, *sameobjecterr,
|
||||||
*outofrangeerr, *noscripterr, *loadingerr, *slowscripterr, *bgsaveerr,
|
*outofrangeerr, *noscripterr, *loadingerr, *slowscripterr, *bgsaveerr,
|
||||||
*masterdownerr, *roslaveerr, *execaborterr, *noautherr, *noreplicaserr,
|
*masterdownerr, *roslaveerr, *execaborterr, *noautherr, *noreplicaserr,
|
||||||
|
@ -615,9 +615,7 @@ void incrDecrCommand(client *c, long long incr) {
|
|||||||
signalModifiedKey(c,c->db,c->argv[1]);
|
signalModifiedKey(c,c->db,c->argv[1]);
|
||||||
notifyKeyspaceEvent(NOTIFY_STRING,"incrby",c->argv[1],c->db->id);
|
notifyKeyspaceEvent(NOTIFY_STRING,"incrby",c->argv[1],c->db->id);
|
||||||
server.dirty++;
|
server.dirty++;
|
||||||
addReply(c,shared.colon);
|
addReplyLongLong(c, value);
|
||||||
addReply(c,new);
|
|
||||||
addReply(c,shared.crlf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void incrCommand(client *c) {
|
void incrCommand(client *c) {
|
||||||
|
Loading…
Reference in New Issue
Block a user