r/C_Programming • u/Just_Government3790 • Sep 12 '26
Question What C function would you delete and rewrite first, and why?
For me it's fnmatch - mostly because it's 40 year's old and smell's funny.
97
Upvotes
View all comments
Show parent comment
2
u/BlockOfDiamond Sep 13 '26
For struct arrays, the caller could just multiply the size by the count manually. The only advantage I could think of is avoiding overflows on systems with a narrow
size_t.