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

Function zstrdup

app/redis-6.2.6/src/zmalloc.c:320–326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320char *zstrdup(const char *s) {
321 size_t l = strlen(s)+1;
322 char *p = zmalloc(l);
323
324 memcpy(p,s,l);
325 return p;
326}
327
328size_t zmalloc_used_memory(void) {
329 size_t um;

Callers 15

stringConfigInitFunction · 0.85
stringConfigSetFunction · 0.85
syncWithMasterFunction · 0.85
failoverCommandFunction · 0.85
updateFailoverStatusFunction · 0.85
handleSSLReturnCodeFunction · 0.85
initServerConfigFunction · 0.85
restartServerFunction · 0.85
createPidFileFunction · 0.85
changeBindAddrFunction · 0.85

Calls 2

zmallocFunction · 0.85
memcpyFunction · 0.50

Tested by

no test coverage detected