util: Cleaned up lfs_util.h

This one was a bit more involved.

Removes utils that are no longer useful, and made sure some of the
name/API changes over time are adopted consistently:

- lfs_npw2 -> lfs_nlog2
- lfs_tole32_ -> lfs_tole32
- lfs_fromle32_ -> lfs_fromle32

Also did another pass for lfs_ prefixes on mem/str functions. The habit
to use the naked variants of these is hard to break!
This commit is contained in:
Christopher Haster
2025-05-27 21:34:12 -05:00
parent 31aafe0f99
commit 6d4248c685
5 changed files with 21 additions and 122 deletions
+1 -1
View File
@@ -2538,7 +2538,7 @@ getopt_done:;
if (d >= define_count) {
// align to power of two to avoid any superlinear growth
size_t ncount = 1 << lfs_npw2(d+1);
size_t ncount = 1 << lfs_nlog2(d+1);
defines = realloc(defines,
ncount*sizeof(test_define_t));
memset(defines+define_count, 0,