On Tue, 16 Nov 2021 12:35:59 -0600, Scott Cheloha wrote: > In wc(1), the "file" argument to cnt() is NULL when we're enumerating > the standard input. This causes a NULL pointer dereference if we ever > hit one of the warn(3) calls in that function. > > To fix, change the argument name to "path" and make "file" a local > variable that is always initialized to point to a C string. > > While we're here we may as well const the argument pointers.
I don't see the need for separate "path" and "file" variables but if it makes you happy, then OK. - todd