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

Function raxReallocForData

src/rax.c:219–223  ·  view source on GitHub ↗

realloc the node to make room for auxiliary data in order * to store an item in that node. On out of memory NULL is returned. */

Source from the content-addressed store, hash-verified

217/* realloc the node to make room for auxiliary data in order
218 * to store an item in that node. On out of memory NULL is returned. */
219raxNode *raxReallocForData(raxNode *n, void *data) {
220 if (data == NULL) return n; /* No reallocation needed, setting isnull=1 */
221 size_t curlen = raxNodeCurrentLength(n);
222 return rax_realloc(n,curlen+sizeof(void*));
223}
224
225/* Set the node auxiliary data to the specified pointer. */
226void raxSetData(raxNode *n, void *data) {

Callers 1

raxGenericInsertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected