summaryrefslogtreecommitdiff
path: root/proto_text.c
diff options
context:
space:
mode:
authordormando <dormando@rydia.net>2022-09-27 22:25:42 -0700
committerdormando <dormando@rydia.net>2022-10-20 14:43:53 -0700
commitbf3043d574efe295de62897e969337071490ac81 (patch)
treea3f43f6e9ed28ec0276066365903f8416e72234c /proto_text.c
parent493bb69af53f3e34ba87ad002c4a9f6c49470b2b (diff)
downloadmemcached-bf3043d574efe295de62897e969337071490ac81.tar.gz
meta: meta arithmetic command had excess spaces
for HD/NF/etc responses but not VA.
Diffstat (limited to 'proto_text.c')
-rw-r--r--proto_text.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/proto_text.c b/proto_text.c
index ab1130f..649def6 100644
--- a/proto_text.c
+++ b/proto_text.c
@@ -1758,11 +1758,7 @@ static void process_marithmetic_command(conn *c, token_t *tokens, const size_t n
case OK:
if (c->noreply)
resp->skip = true;
- if (settings.meta_response_old) {
- memcpy(resp->wbuf, "OK ", 3);
- } else {
- memcpy(resp->wbuf, "HD ", 3);
- }
+ // *it was filled, set the status below.
break;
case NON_NUMERIC:
errstr = "CLIENT_ERROR cannot increment or decrement non-numeric value";
@@ -1785,7 +1781,7 @@ static void process_marithmetic_command(conn *c, token_t *tokens, const size_t n
item_created = true;
} else {
// Not sure how we can get here if we're holding the lock.
- memcpy(resp->wbuf, "NS ", 3);
+ memcpy(resp->wbuf, "NS", 2);
}
} else {
errstr = "SERVER_ERROR Out of memory allocating new item";
@@ -1800,14 +1796,14 @@ static void process_marithmetic_command(conn *c, token_t *tokens, const size_t n
}
pthread_mutex_unlock(&c->thread->stats.mutex);
// won't have a valid it here.
- memcpy(p, "NF ", 3);
- p += 3;
+ memcpy(p, "NF", 2);
+ p += 2;
}
break;
case DELTA_ITEM_CAS_MISMATCH:
// also returns without a valid it.
- memcpy(p, "EX ", 3);
- p += 3;
+ memcpy(p, "EX", 2);
+ p += 2;
break;
}