On Wed, 2011-05-11 at 11:12 +0200, Gilles Chanteperdrix wrote: > On 05/09/2011 09:36 AM, [email protected] wrote: > >> From: Gilles Chanteperdrix > >> [mailto:[email protected]] Sent: Thursday, May 05, > >> 2011 10:15 AM ... You can provide the readv implementation, and > >> implement read in terms of readv by passing an iovec with just one > >> buffer. Please also try and make the code a bit more readable than > >> in the previous patch, with only one statement and one "if" by > >> line. > > > > Hello, > > > > thank you for your suggestions. I now remade the patch accordingly. > > If you have further improvements to suggest, please let me know. > > I am sorry to ask you to change your patch again, but the loop is quite > hard to understand. It would be nice if you could use a simple loops > which copies the pieces of the iovec. So, maybe use two nested loops. >
Also, let's avoid constructs like these: > buf = iovec->iov_base, count = iovec++->iov_len; Disk space is cheap so we can afford a few more characters per line; however, engineering time for tracking down issues introduced by obfuscated code is expensive. In short, one executable statement per line is desired, our code should have nothing to hide. -- Philippe. _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
