Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx> --- diff.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/diff.c b/diff.c index 80eb0c2..dfbed41 100644 --- a/diff.c +++ b/diff.c @@ -759,17 +759,6 @@ struct diff_words_buffer { int orig_nr, orig_alloc; }; -static void diff_words_append(char *line, unsigned long len, - struct diff_words_buffer *buffer) -{ - ALLOC_GROW(buffer->text.ptr, buffer->text.size + len, buffer->alloc); - line++; - len--; - memcpy(buffer->text.ptr + buffer->text.size, line, len); - buffer->text.size += len; - buffer->text.ptr[buffer->text.size] = '\0'; -} - struct diff_words_style_elem { const char *prefix; const char *suffix; @@ -799,6 +788,17 @@ struct diff_words_data { struct diff_words_style *style; }; +static void diff_words_append(char *line, unsigned long len, + struct diff_words_buffer *buffer) +{ + ALLOC_GROW(buffer->text.ptr, buffer->text.size + len, buffer->alloc); + line++; + len--; + memcpy(buffer->text.ptr + buffer->text.size, line, len); + buffer->text.size += len; + buffer->text.ptr[buffer->text.size] = '\0'; +} + static int fn_out_diff_words_write_helper(FILE *fp, struct diff_words_style_elem *st_el, const char *newline, -- 2.3.0.rc1.137.g477eb31 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html