On 10/14/2016 04:02 PM, Eric Blake wrote:
> /**
> * Consume data from a socket that we don't want
> *
> - * @param f a file descriptor
> + * @param c the client data stream
> * @param buf a buffer
> * @param len the number of bytes to consume
> * @param bufsiz the size of the buffer
> @@ -373,6 +373,21 @@ static inline void consume(CLIENT* c, void * buf, size_t len, size_t bufsiz) {
This signature threw me off. Good design says that if you are going to
have paired parameters (buf and bufsize), you generally want them
adjacent, not separated by an unrelated parameter (len). Shall I submit
the obvious patch to swap parameter order and update all callers?
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
Attachment:
signature.asc
Description: OpenPGP digital signature