Re: [PATCH v12 03/20] pkt-line: add gentle version of packet_write
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Jun 25, 2016, 14:01 UTC
- Message-ID
- <CACsJy8C82KMjPUdYA-QHz7zCx_pXtSUCL8O4nWJY2Jyit9Q3hw@mail.gmail.com>
- In-Reply-To
- <1463694357-6503-4-git-send-email-dturner@twopensource.com>
On Thu, May 19, 2016 at 11:45 PM, David Turner <dturner@twopensource.com> wrote:
Show 5 quoted lines
> +int packet_flush_gently(int fd)
> +{
> + packet_trace("0000", 4, 1);
> + return write_in_full(fd, "0000", 4) != 4;
> +}The return value convention here is a bit weird, isn't it? Usually we have "zero good, minus one (or negative) bad" or "zero bad, positive good". This one goes "zero good, one bad". Same goes for the other _gently() function.
-- Duy