diff options
author | Phillip Wood <phillip.wood@dunelm.org.uk> | 2021-12-09 10:30:08 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-09 13:24:06 -0800 |
commit | b4a5c5c419009c26935536fa7039ad5073acb237 (patch) | |
tree | 555ea04ba18ab3b0be41b18e75e2b1e8c08e99b4 /diff.c | |
parent | diff --color-moved-ws=allow-indentation-change: improve hash lookups (diff) | |
download | tgif-b4a5c5c419009c26935536fa7039ad5073acb237.tar.xz |
diff: use designated initializers for emitted_diff_symbol
This makes it clearer which fields are being explicitly initialized
and will simplify the next commit where we add a new field to the
struct.
Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1497,7 +1497,9 @@ static void emit_diff_symbol_from_struct(struct diff_options *o, static void emit_diff_symbol(struct diff_options *o, enum diff_symbol s, const char *line, int len, unsigned flags) { - struct emitted_diff_symbol e = {line, len, flags, 0, 0, s}; + struct emitted_diff_symbol e = { + .line = line, .len = len, .flags = flags, .s = s + }; if (o->emitted_symbols) append_emitted_diff_symbol(o, &e); |