style: the opening '{' of a function is in a separate line
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Nguyễn Thái Ngọc Duy committed
Dec 9, 2018 at 11:25 UTC
3b3357626edc841a51d8885ddf6986bab5b6f778
15 files changed
+35
-17
bisect.c
+2
-1
@@ -558,7 +558,8 @@ struct commit_list *filter_skipped(struct commit_list *list,
558
* is increased by one between each call, but that should not matter
559
* for this application.
560
*/
561
-static unsigned get_prn(unsigned count) {
561
+static unsigned get_prn(unsigned count)
562
+{
563
count = count * 1103515245 + 12345;
564
return (count/65536) % PRN_MODULO;
565
}
builtin/config.c
+2
-1
@@ -164,7 +164,8 @@ static NORETURN void usage_builtin_config(void)
164
usage_with_options(builtin_config_usage, builtin_config_options);
165
}
166
167
-static void check_argc(int argc, int min, int max) {
167
+static void check_argc(int argc, int min, int max)
168
+{
169
if (argc >= min && argc <= max)
170
return;
171
if (min == max)
builtin/push.c
+3
-1
@@ -143,7 +143,9 @@ static int push_url_of_remote(struct remote *remote, const char ***url_p)
143
return remote->url_nr;
144
}
145
146
-static NORETURN int die_push_simple(struct branch *branch, struct remote *remote) {
146
+static NORETURN int die_push_simple(struct branch *branch,
147
+ struct remote *remote)
148
+{
149
/*
150
* There's no point in using shorten_unambiguous_ref here,
151
* as the ambiguity would be on the remote side, not what
convert.c
+2
-1
@@ -778,7 +778,8 @@ static int start_multi_file_filter_fn(struct subprocess_entry *subprocess)
778
779
static void handle_filter_error(const struct strbuf *filter_status,
780
struct cmd2process *entry,
781
- const unsigned int wanted_capability) {
781
+ const unsigned int wanted_capability)
782
+{
783
if (!strcmp(filter_status->buf, "error"))
784
; /* The filter signaled a problem with the file. */
785
else if (!strcmp(filter_status->buf, "abort") && wanted_capability) {
credential-cache--daemon.c
+2
-1
@@ -91,7 +91,8 @@ static timestamp_t check_expirations(void)
91
}
92
93
static int read_request(FILE *fh, struct credential *c,
94
- struct strbuf *action, int *timeout) {
94
+ struct strbuf *action, int *timeout)
95
+{
96
static struct strbuf item = STRBUF_INIT;
97
const char *p;
98
diff.c
+4
-2
@@ -1637,7 +1637,8 @@ static void emit_hunk_header(struct emit_callback *ecbdata,
1637
strbuf_release(&msgbuf);
1638
}
1639
1640
-static struct diff_tempfile *claim_diff_tempfile(void) {
1640
+static struct diff_tempfile *claim_diff_tempfile(void)
1641
+{
1642
int i;
1643
for (i = 0; i < ARRAY_SIZE(diff_temp); i++)
1644
if (!diff_temp[i].name)
@@ -4819,7 +4820,8 @@ static int parse_diff_filter_opt(const char *optarg, struct diff_options *opt)
4820
return 0;
4821
}
4822
4822
-static void enable_patch_output(int *fmt) {
4823
+static void enable_patch_output(int *fmt)
4824
+{
4825
*fmt &= ~DIFF_FORMAT_NO_OUTPUT;
4826
*fmt |= DIFF_FORMAT_PATCH;
4827
}
git.c
+2
-1
@@ -98,7 +98,8 @@ static int list_cmds(const char *spec)
98
return 0;
99
}
100
101
-static void commit_pager_choice(void) {
101
+static void commit_pager_choice(void)
102
+{
103
switch (use_pager) {
104
case 0:
105
setenv("GIT_PAGER", "cat", 1);
imap-send.c
+2
-1
@@ -1471,7 +1471,8 @@ static CURL *setup_curl(struct imap_server_conf *srvc, struct credential *cred)
1471
}
1472
1473
static int curl_append_msgs_to_imap(struct imap_server_conf *server,
1474
- struct strbuf* all_msgs, int total) {
1474
+ struct strbuf* all_msgs, int total)
1475
+{
1476
int ofs = 0;
1477
int n = 0;
1478
struct buffer msgbuf = { STRBUF_INIT, 0 };
remote-curl.c
+2
-1
@@ -617,7 +617,8 @@ static int probe_rpc(struct rpc_state *rpc, struct slot_results *results)
617
return err;
618
}
619
620
-static curl_off_t xcurl_off_t(size_t len) {
620
+static curl_off_t xcurl_off_t(size_t len)
621
+{
622
uintmax_t size = len;
623
if (size > maximum_signed_value_of_type(curl_off_t))
624
die("cannot handle pushes this big");
sequencer.c
+4
-2
@@ -1670,7 +1670,8 @@ static int update_squash_messages(enum todo_command command,
1670
return res;
1671
}
1672
1673
-static void flush_rewritten_pending(void) {
1673
+static void flush_rewritten_pending(void)
1674
+{
1675
struct strbuf buf = STRBUF_INIT;
1676
struct object_id newoid;
1677
FILE *out;
@@ -1695,7 +1696,8 @@ static void flush_rewritten_pending(void) {
1696
}
1697
1698
static void record_in_rewritten(struct object_id *oid,
1698
- enum todo_command next_command) {
1699
+ enum todo_command next_command)
1700
+{
1701
FILE *out = fopen_or_warn(rebase_path_rewritten_pending(), "a");
1702
1703
if (!out)
string-list.c
+2
-1
@@ -155,7 +155,8 @@ static int item_is_not_empty(struct string_list_item *item, void *unused)
155
return *item->string != '\0';
156
}
157
158
-void string_list_remove_empty_items(struct string_list *list, int free_util) {
158
+void string_list_remove_empty_items(struct string_list *list, int free_util)
159
+{
160
filter_string_list(list, free_util, item_is_not_empty, NULL);
161
}
162
t/helper/test-sigchain.c
+2
-1
@@ -14,7 +14,8 @@ X(two)
14
X(three)
15
#undef X
16
17
-int cmd__sigchain(int argc, const char **argv) {
17
+int cmd__sigchain(int argc, const char **argv)
18
+{
19
sigchain_push(SIGTERM, one);
20
sigchain_push(SIGTERM, two);
21
sigchain_push(SIGTERM, three);
transport-helper.c
+2
-1
@@ -1026,7 +1026,8 @@ static int push_refs(struct transport *transport,
1026
}
1027
1028
1029
-static int has_attribute(const char *attrs, const char *attr) {
1029
+static int has_attribute(const char *attrs, const char *attr)
1030
+{
1031
int len;
1032
if (!attrs)
1033
return 0;
url.c
+2
-1
@@ -104,7 +104,8 @@ void end_url_with_slash(struct strbuf *buf, const char *url)
104
strbuf_complete(buf, '/');
105
}
106
107
-void str_end_url_with_slash(const char *url, char **dest) {
107
+void str_end_url_with_slash(const char *url, char **dest)
108
+{
109
struct strbuf buf = STRBUF_INIT;
110
end_url_with_slash(&buf, url);
111
free(*dest);
userdiff.c
+2
-1
@@ -265,7 +265,8 @@ int userdiff_config(const char *k, const char *v)
265
return 0;
266
}
267
268
-struct userdiff_driver *userdiff_find_by_name(const char *name) {
268
+struct userdiff_driver *userdiff_find_by_name(const char *name)
269
+{
270
int len = strlen(name);
271
return userdiff_find_by_namelen(name, len);
272
}