pkt-line.h: move comment closer to the associated code

ec9a37d ("pkt-line.[ch]: remove unused packet_read_line_buf()", 2021-10-14) removed the "src_buffer" and "src_len" parameters from packet_read(), only leaving them at packet_read_with_status(). Let's also update the function documentation by moving the comment about these parameters from the former to the latter. Signed-off-by: Matheus Tavares <matheus.bernardino@usp.br> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Matheus Tavares committed Jul 22, 2022 at 08:10 UTC ce5f07983d1834a4d22931be3077192001fd0d70
1 file changed +8 -8
pkt-line.h
+8 -8
@@ -49,14 +49,6 @@ void packet_fflush(FILE *f);
49 * Read a packetized line into the buffer, which must be at least size bytes
50 * long. The return value specifies the number of bytes read into the buffer.
51 *
52 - * If src_buffer and *src_buffer are not NULL, it should point to a buffer
53 - * containing the packet data to parse, of at least *src_len bytes. After the
54 - * function returns, src_buf will be incremented and src_len decremented by the
55 - * number of bytes consumed.
56 - *
57 - * If src_buffer (or *src_buffer) is NULL, then data is read from the
58 - * descriptor "fd".
59 - *
52 * If options does not contain PACKET_READ_GENTLE_ON_EOF, we will die under any
53 * of the following conditions:
54 *
@@ -104,6 +96,14 @@ int packet_length(const char lenbuf_hex[4]);
96 * returns an 'enum packet_read_status' which indicates the status of the read.
97 * The number of bytes read will be assigned to *pktlen if the status of the
98 * read was 'PACKET_READ_NORMAL'.
99 + *
100 + * If src_buffer and *src_buffer are not NULL, it should point to a buffer
101 + * containing the packet data to parse, of at least *src_len bytes. After the
102 + * function returns, src_buf will be incremented and src_len decremented by the
103 + * number of bytes consumed.
104 + *
105 + * If src_buffer (or *src_buffer) is NULL, then data is read from the
106 + * descriptor "fd".
107 */
108 enum packet_read_status {
109 PACKET_READ_EOF,