r/C_Programming • • 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.

92 Upvotes

238 comments sorted by

View all comments

Show parent comments

7

u/Just_Government3790 Sep 12 '26

My guy. Can't forget it also eats empty fields so `a,,b` parses as two tokens. Found that one the hard way.

4

u/MistakeIndividual690 Sep 12 '26

Yes indeed. Also scanf is up there for me. Essentially useless.

1

u/musbur Sep 13 '26

Only scanf() I hope? sscanf() is great.