RESP3: remove other pointless shared object.

This commit is contained in:
antirez 2018-11-26 18:57:37 +01:00
parent b7e8b734c9
commit fc9a3de97d
3 changed files with 3 additions and 5 deletions

View File

@ -1428,9 +1428,7 @@ void createSharedObjects(void) {
shared.emptybulk = createObject(OBJ_STRING,sdsnew("$0\r\n\r\n"));
shared.czero = createObject(OBJ_STRING,sdsnew(":0\r\n"));
shared.cone = createObject(OBJ_STRING,sdsnew(":1\r\n"));
shared.cnegone = createObject(OBJ_STRING,sdsnew(":-1\r\n"));
shared.emptyarray = createObject(OBJ_STRING,sdsnew("*0\r\n"));
shared.null = createObject(OBJ_STRING,sdsnew("_\r\n"));
shared.pong = createObject(OBJ_STRING,sdsnew("+PONG\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"));

View File

@ -781,8 +781,8 @@ struct moduleLoadQueueEntry {
};
struct sharedObjectsStruct {
robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *cnegone, *pong, *space,
*colon, *queued, *null,
robj *crlf, *ok, *err, *emptybulk, *czero, *cone, *pong, *space,
*colon, *queued,
*emptyarray, *wrongtypeerr, *nokeyerr, *syntaxerr, *sameobjecterr,
*outofrangeerr, *noscripterr, *loadingerr, *slowscripterr, *bgsaveerr,
*masterdownerr, *roslaveerr, *execaborterr, *noautherr, *noreplicaserr,

View File

@ -298,7 +298,7 @@ void linsertCommand(client *c) {
server.dirty++;
} else {
/* Notify client of a failed insert */
addReply(c,shared.cnegone);
addReplyLongLong(c,-1);
return;
}