aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-02-07 13:52:04 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-02-08 09:09:59 +0000
commit4bad85b59334467ac839ed2dd91abb6625bc5b89 (patch)
tree58bc014c759d125b9c143283c5502219013e5f77 /scripts
parentMerge branch 'url-detection' (diff)
misc: when free:ing tll lists, prefer tll_remove() over tll_free()
In many places we have the following pattern: tll_foreach(list, it) free(it->item.thing); tll_free(list); Since all tll functions are macros, and thus inlined, and since tll_free in itself expands to a tll_foreach(), the above pattern expands to more native code than necessary. This is somewhat smaller: tll_foreach(list, it) { free(it->item.thing); tll_remove(list, it); }
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions