From: Joel Rosdahl Date: Tue, 22 Dec 2015 19:00:00 +0000 (+0100) Subject: Improve code style X-Git-Tag: v3.3~134 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6f75bfb6d19d54b5be62bc0c3875cc5f0f37e92;p=thirdparty%2Fccache.git Improve code style --- diff --git a/ccache.c b/ccache.c index 0fa17c1c2..b9baacac1 100644 --- a/ccache.c +++ b/ccache.c @@ -737,7 +737,7 @@ process_preprocessed_file(struct mdfour *hash, const char *path) q = p; while ((header = strtok_r(q, PATH_DELIM, &saveptr))) { ignore_headers = x_realloc(ignore_headers, - (ignore_headers_len+1) * sizeof(char*)); + (ignore_headers_len+1) * sizeof(char *)); ignore_headers[ignore_headers_len++] = x_strdup(header); q = NULL; } diff --git a/conf.c b/conf.c index 6ff9dddae..cf65c08b9 100644 --- a/conf.c +++ b/conf.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2011-2014 Joel Rosdahl + * Copyright (C) 2011-2015 Joel Rosdahl * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the Free @@ -568,8 +568,10 @@ conf_print_items(struct conf *conf, reformat(&s, "hash_dir = %s", bool_to_string(conf->hash_dir)); printer(s, conf->item_origins[find_conf("hash_dir")->number], context); - reformat(&s, "ignore_headers_in_manifest = %s", conf->ignore_headers_in_manifest); - printer(s, conf->item_origins[find_conf("ignore_headers_in_manifest")->number], + reformat(&s, "ignore_headers_in_manifest = %s", + conf->ignore_headers_in_manifest); + printer(s, + conf->item_origins[find_conf("ignore_headers_in_manifest")->number], context); reformat(&s, "log_file = %s", conf->log_file); diff --git a/test/test_conf.c b/test/test_conf.c index 01cdfd842..57dab354b 100644 --- a/test/test_conf.c +++ b/test/test_conf.c @@ -403,7 +403,8 @@ TEST(conf_print_items) CHECK_STR_EQ("extra_files_to_hash = efth", received_conf_items[n++].descr); CHECK_STR_EQ("hard_link = true", received_conf_items[n++].descr); CHECK_STR_EQ("hash_dir = true", received_conf_items[n++].descr); - CHECK_STR_EQ("ignore_headers_in_manifest = ihim", received_conf_items[n++].descr); + CHECK_STR_EQ("ignore_headers_in_manifest = ihim", + received_conf_items[n++].descr); CHECK_STR_EQ("log_file = lf", received_conf_items[n++].descr); CHECK_STR_EQ("max_files = 4711", received_conf_items[n++].descr); CHECK_STR_EQ("max_size = 98.7M", received_conf_items[n++].descr);