Collin Funk <collin.fu...@gmail.com> writes: > There are some uses of 'caddr_t' in Inetutils. This is a prehistoric > BSD type. I think it was because early versions of C didn't > automatically convert 'void *' to the appropriate type. ... > Patch 0001 adds a syntax check for this type and patch 0002 removes > it's uses since this type is not standardized.
Looks good to me, feel free to push. > I think it would be nice continue removing old C stuff like this. > Another example is 'index' vs 'strchr' and 'rindex' vs 'strrchr'. > That stuff probably hinders portability more than it helps as the > years go on. :) I do mostly agree, however there is another concern: frivolious changes like this makes it harder to align code with BSD implementations for auditing and security backports. I've sporadically coordinated some security fixes with tnftp which seems to be the maintained BSD ftp implementation. I've noticed they have a bunch of fixes that went into that code over the years that we don't have. Of course, they likely won't add any of our improvements, but I don't think there is a lot of arguments why we shouldn't continue to import good patches from BSD ftp to GNU ftp. I have a mental todo to attempt to do a BSD-to-GNU diff on some of these tools, and backport all reasonable improvements they have. For this particular example, they replaced a (caddr_t*) cast to (char*) which I think is just wrong (the type is sockaddr_in and not char*). So your patch is better. /Simon
signature.asc
Description: PGP signature