diff options
author | Michael Haggerty <mhagger@alum.mit.edu> | 2012-11-25 12:08:36 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-11-26 13:32:06 -0800 |
commit | 32a8569ecf211cc2ba98333daa10b1a6e783ae87 (patch) | |
tree | add6d7d3764e9070fba74d079643e85228fc5f74 /builtin/check-attr.c | |
parent | xml_entities(): use function strbuf_addstr_xml_quoted() (diff) | |
download | tgif-32a8569ecf211cc2ba98333daa10b1a6e783ae87.tar.xz |
lf_to_crlf(): NUL-terminate msg_data::data
Through the rest of the file, the data member of struct msg_data is
kept NUL-terminated, and that fact is relied upon in a couple of
places. Change lf_to_crlf() to preserve this invariant.
In fact, there are no execution paths in which lf_to_crlf() is called
and then its data member is required to be NUL-terminated, but it is
better to be consistent to prevent future confusion.
Document the invariant in the struct msg_data definition.
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/check-attr.c')
0 files changed, 0 insertions, 0 deletions