提交 f0f3ca8d 编写于 作者: J Jesper Juhl 提交者: Jiri Kosina

docproc: cleanup brace placement

The placement of the opening brace "{" after 'if' statements in
scripts/docproc.c is inconsistent. Most are placed on the same line as the 'if'
statement itself as per CodingStyle, but a few are not.  This patch cleans up
the inconsistency. We save a few source lines and the file then uses the same
style throughout, which is nice.
Signed-off-by: NJesper Juhl <jj@chaosbits.net>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 1c5454ee
...@@ -205,8 +205,7 @@ static void find_export_symbols(char * filename) ...@@ -205,8 +205,7 @@ static void find_export_symbols(char * filename)
PATH_MAX - strlen(real_filename)); PATH_MAX - strlen(real_filename));
sym = add_new_file(filename); sym = add_new_file(filename);
fp = fopen(real_filename, "r"); fp = fopen(real_filename, "r");
if (fp == NULL) if (fp == NULL) {
{
fprintf(stderr, "docproc: "); fprintf(stderr, "docproc: ");
perror(real_filename); perror(real_filename);
exit(1); exit(1);
...@@ -487,8 +486,7 @@ static void parse_file(FILE *infile) ...@@ -487,8 +486,7 @@ static void parse_file(FILE *infile)
default: default:
defaultline(line); defaultline(line);
} }
} } else {
else {
defaultline(line); defaultline(line);
} }
} }
...@@ -519,8 +517,7 @@ int main(int argc, char *argv[]) ...@@ -519,8 +517,7 @@ int main(int argc, char *argv[])
exit(2); exit(2);
} }
if (strcmp("doc", argv[1]) == 0) if (strcmp("doc", argv[1]) == 0) {
{
/* Need to do this in two passes. /* Need to do this in two passes.
* First pass is used to collect all symbols exported * First pass is used to collect all symbols exported
* in the various files; * in the various files;
...@@ -556,9 +553,7 @@ int main(int argc, char *argv[]) ...@@ -556,9 +553,7 @@ int main(int argc, char *argv[])
fprintf(stderr, "Warning: didn't use docs for %s\n", fprintf(stderr, "Warning: didn't use docs for %s\n",
all_list[i]); all_list[i]);
} }
} } else if (strcmp("depend", argv[1]) == 0) {
else if (strcmp("depend", argv[1]) == 0)
{
/* Create first part of dependency chain /* Create first part of dependency chain
* file.tmpl */ * file.tmpl */
printf("%s\t", argv[2]); printf("%s\t", argv[2]);
...@@ -571,9 +566,7 @@ int main(int argc, char *argv[]) ...@@ -571,9 +566,7 @@ int main(int argc, char *argv[])
findall = adddep; findall = adddep;
parse_file(infile); parse_file(infile);
printf("\n"); printf("\n");
} } else {
else
{
fprintf(stderr, "Unknown option: %s\n", argv[1]); fprintf(stderr, "Unknown option: %s\n", argv[1]);
exit(1); exit(1);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册