Re: [PATCH v3 02/10] pkt-line: add packet_write function

2017-10-10 Thread Jonathan Tan
On Tue, 3 Oct 2017 13:14:59 -0700 Brandon Williams wrote: > +void packet_write(const int fd_out, const char *buf, size_t size) No need for "const" in "const int fd_out", I think. Same comment for the header file. > +{ > + if (packet_write_gently(fd_out, buf, size)) > + die_errn

[PATCH v3 02/10] pkt-line: add packet_write function

2017-10-03 Thread Brandon Williams
Add a function which can be used to write the contents of an arbitrary buffer. This makes it easy to build up data in a buffer before writing the packet instead of formatting the entire contents of the packet using 'packet_write_fmt()'. Signed-off-by: Brandon Williams --- pkt-line.c | 6 ++