diff options
author | Jonathan Nieder <jrnieder@gmail.com> | 2011-03-16 02:08:34 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-03-16 12:49:02 -0700 |
commit | 9cba13ca5d233a4e1a7068f3f5ed5836a081dcc0 (patch) | |
tree | 434a9b6b6df083e8c340541def4c29c4896b0721 /diff.c | |
parent | c6c8d0b797e33ce1f22d50b46d9c6eba91ed2cbc (diff) | |
download | git-9cba13ca5d233a4e1a7068f3f5ed5836a081dcc0.tar.gz git-9cba13ca5d233a4e1a7068f3f5ed5836a081dcc0.tar.xz |
standardize brace placement in struct definitions
In a struct definitions, unlike functions, the prevailing style is for
the opening brace to go on the same line as the struct name, like so:
struct foo {
int bar;
char *baz;
};
Indeed, grepping for 'struct [a-z_]* {$' yields about 5 times as many
matches as 'struct [a-z_]*$'.
Linus sayeth:
Heretic people all over the world have claimed that this inconsistency
is ... well ... inconsistent, but all right-thinking people know that
(a) K&R are _right_ and (b) K&R are right.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -606,16 +606,14 @@ static void diff_words_append(char *line, unsigned long len, buffer->text.ptr[buffer->text.size] = '\0'; } -struct diff_words_style_elem -{ +struct diff_words_style_elem { const char *prefix; const char *suffix; const char *color; /* NULL; filled in by the setup code if * color is enabled */ }; -struct diff_words_style -{ +struct diff_words_style { enum diff_words_type type; struct diff_words_style_elem new, old, ctx; const char *newline; |