Re: [PATCH v2 5/7] remote-curl: error on incomplete packet
- From
Denton Liu <liu.denton@gmail.com>
- Date
- May 18, 2020, 16:51 UTC
- Message-ID
- <20200518165105.GA2461535@generichostname>
- In-Reply-To
- <20200518162225.GB42240@coredump.intra.peff.net>
Hi Peff,
Thanks for reading over the patch carefully. It is much appreciated :)
On Mon, May 18, 2020 at 12:22:25PM -0400, Jeff King wrote:
> I'm not sure if it's worth replacing "4" with ARRAY_SIZE(state->len_buf). > I generally try to avoid magic numbers, but it's certainly not like one > could change the size of len_buf and this code would still be useful. :)
Yeah, I'm a bit sad about all the magic 4's that are strewn in the code too. I was thinking about consolidating all of the magic 4's into a constant in pkt-line as a preparatory patch but I didn't want to risk holding up this series. I think once the dust settles here, I'll go ahead and do that. For now, though, I think I'll leave it as is.