MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / ldbRedisProtocolToHuman_Bulk

Function ldbRedisProtocolToHuman_Bulk

src/scripting.cpp:2371–2383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2369}
2370
2371char *ldbRedisProtocolToHuman_Bulk(sds *o, char *reply) {
2372 char *p = strchr(reply+1,'\r');
2373 long long bulklen;
2374
2375 string2ll(reply+1,p-reply-1,&bulklen);
2376 if (bulklen == -1) {
2377 *o = sdscatlen(*o,"NULL",4);
2378 return p+2;
2379 } else {
2380 *o = sdscatrepr(*o,p+2,bulklen);
2381 return p+2+bulklen+2;
2382 }
2383}
2384
2385char *ldbRedisProtocolToHuman_Status(sds *o, char *reply) {
2386 char *p = strchr(reply+1,'\r');

Callers 1

ldbRedisProtocolToHumanFunction · 0.85

Calls 3

sdscatlenFunction · 0.85
sdscatreprFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected