MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ldbRedisProtocolToHuman_MultiBulk

Function ldbRedisProtocolToHuman_MultiBulk

app/redis-6.2.6/src/scripting.c:2369–2387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2367}
2368
2369char *ldbRedisProtocolToHuman_MultiBulk(sds *o, char *reply) {
2370 char *p = strchr(reply+1,'\r');
2371 long long mbulklen;
2372 int j = 0;
2373
2374 string2ll(reply+1,p-reply-1,&mbulklen);
2375 p += 2;
2376 if (mbulklen == -1) {
2377 *o = sdscatlen(*o,"NULL",4);
2378 return p;
2379 }
2380 *o = sdscatlen(*o,"[",1);
2381 for (j = 0; j < mbulklen; j++) {
2382 p = ldbRedisProtocolToHuman(o,p);
2383 if (j != mbulklen-1) *o = sdscatlen(*o,",",1);
2384 }
2385 *o = sdscatlen(*o,"]",1);
2386 return p;
2387}
2388
2389char *ldbRedisProtocolToHuman_Set(sds *o, char *reply) {
2390 char *p = strchr(reply+1,'\r');

Callers 1

ldbRedisProtocolToHumanFunction · 0.85

Calls 4

strchrFunction · 0.85
sdscatlenFunction · 0.85
ldbRedisProtocolToHumanFunction · 0.85
string2llFunction · 0.70

Tested by

no test coverage detected