Thread (1 message) 1 message, 1 author, 2020-05-18

Re: [PATCH v2 4/7] pkt-line: extern packet_length()

From: Junio C Hamano <hidden>
Date: 2020-05-18 18:44:30

Jeff King [off-list ref] writes:
quoted
+/*
+ * Convert a four hex digit packet line length header into its numeric
+ * representation. linelen should not be null-terminated.
Minor nit, but it is perfectly fine if there is a NUL. Maybe "linelen
does not need to be..."?
Yup, I was wondering about the same thing.  I actually would go
stronger than "does not need to be", as the byte after these four
would never be taken as "the terminator for the linelen bytes", even
it happens to be '\0'.

Just getting rid of the extra sentence would suffice for that, I
think.  The first sentence makes it clear that it is about
interpreting the 4 bytes we are given, and those 4 bytes come from
the 'packet line length header' the caller has.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help