MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / rm_strndup

Function rm_strndup

src/util/rmalloc.h:37–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static inline char *rm_strndup(const char *s, size_t n) {
38 char *ret = (char *)rm_malloc(n + 1);
39
40 if(ret) {
41 ret[n] = '\0';
42 memcpy(ret, s, n);
43 }
44 return ret;
45}
46
47#endif
48#ifndef REDIS_MODULE_TARGET

Callers 4

_get_vars_inner_repFunction · 0.85
match_regex_scan_cbFunction · 0.85
AR_SPLITFunction · 0.85
raxKeysFunction · 0.85

Calls 1

rm_mallocFunction · 0.85

Tested by

no test coverage detected