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

Function _quicklistBookmarkDelete

src/quicklist.c:1512–1519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1510}
1511
1512void _quicklistBookmarkDelete(quicklist *ql, quicklistBookmark *bm) {
1513 int index = bm - ql->bookmarks;
1514 zfree(bm->name);
1515 ql->bookmark_count--;
1516 memmove(bm, bm+1, (ql->bookmark_count - index)* sizeof(*bm));
1517 /* NOTE: We do not shrink (realloc) the quicklist yet (to avoid resonance,
1518 * it may be re-used later (a call to realloc may NOP). */
1519}
1520
1521void quicklistBookmarksClear(quicklist *ql) {
1522 while (ql->bookmark_count)

Callers 2

__quicklistDelNodeFunction · 0.85
quicklistBookmarkDeleteFunction · 0.85

Calls 1

zfreeFunction · 0.85

Tested by

no test coverage detected