Re: argument names in function declarations

Alan Barrett <[email protected]> Tue, 25 Aug 2009 08:30:12 +0200
Newsgroups gmane.os.netbsd.devel.general
Message-ID <[email protected]>
On Tue, 25 Aug 2009, David Holland wrote:
> However, outside of that context, argument names, or at least some
> argument names, serve as a useful form of documentation. While the
> "vp" in "struct vnode *vp" doesn't add much value, writing "unsigned
> flags" instead of just "unsigned" is actually useful, and IMO it
> should be, if anything, encouraged.

You can put the argument name in a comment.  I sometimes use this style
in non-NetBSD code:

    int ioctl(int /* d */, unsigned long /* request */, void * /* argp */);

--apb (Alan Barrett)