[fix] fixed the un-refactor bug.

This commit is contained in:
filipecosta90 2019-09-25 17:28:42 +01:00
parent 733280d9cb
commit af15b285fa

View File

@ -1126,9 +1126,10 @@ int RM_ReplyWithLongLong(RedisModuleCtx *ctx, long long ll) {
int replyWithStatus(RedisModuleCtx *ctx, const char *msg, char *prefix) {
client *c = moduleGetReplyClient(ctx);
if (c == NULL) return REDISMODULE_OK;
const size_t len = strlen(msg);
addReplyProto(c,"-",1);
addReplyProto(c,msg,len);
const size_t msgLen = strlen(msg);
const size_t prefixLen = strlen(prefix);
addReplyProto(c,prefix,prefixLen);
addReplyProto(c,msg,msgLen);
addReplyProto(c,"\r\n",2);
return REDISMODULE_OK;
}