MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / n_insert

Function n_insert

dep/hfsutils/libhfs/node.c:373–385  ·  view source on GitHub ↗

* NAME: node->insert() * DESCRIPTION: insert a new record into a node; return a record for parent */

Source from the content-addressed store, hash-verified

371 * DESCRIPTION: insert a new record into a node; return a record for parent
372 */
373int n_insert(node *np, byte *record, unsigned int *reclen)
374{
375 /* check for free space */
376
377 if (np->nd.ndNRecs >= HFS_MAX_NRECS ||
378 *reclen + 2 > NODEFREE(*np))
379 return split(np, record, reclen);
380
381 n_insertx(np, record, *reclen);
382 *reclen = 0;
383
384 return bt_putnode(np);
385}
386
387/*
388 * NAME: join()

Callers 1

insertxFunction · 0.85

Calls 3

n_insertxFunction · 0.85
bt_putnodeFunction · 0.85
splitFunction · 0.70

Tested by

no test coverage detected