Lars Schneider writes:
> You are right. Would the solution below be acceptable?
> I would like to keep the `packet_size` variable as it eases the rest
> of the function.
>
>
> const size_t packet_size = size + 4;
>
> - if (packet_size > sizeof(packet_write_buffer))
> + if (size
> On 04 Oct 2016, at 21:33, Junio C Hamano wrote:
>
> larsxschnei...@gmail.com writes:
>
>> From: Lars Schneider
>>
>>
>> +static int packet_write_gently(const int fd_out, const char *buf, size_t
>> size)
>> +{
>> +static char packet_write_buffer[LARGE_PACKET_MAX];
>> +const size_t
larsxschnei...@gmail.com writes:
> From: Lars Schneider
>
> packet_write_fmt_gently() uses format_packet() which lets the caller
> only send string data via "%s". That means it cannot be used for
> arbitrary data that may contain NULs.
>
> Add packet_write_gently() which writes arbitrary data and
From: Lars Schneider
packet_write_fmt_gently() uses format_packet() which lets the caller
only send string data via "%s". That means it cannot be used for
arbitrary data that may contain NULs.
Add packet_write_gently() which writes arbitrary data and does not die
in case of an error. The functio
4 matches
Mail list logo