]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Improve code style
authorJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Dec 2015 19:00:00 +0000 (20:00 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Tue, 22 Dec 2015 19:01:00 +0000 (20:01 +0100)
ccache.c
conf.c
test/test_conf.c

index 0fa17c1c2fbb74fded85156f9004eda535ffb944..b9baacac1a6613d98dfb179a39a493ee50ed2a27 100644 (file)
--- 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 6ff9dddae690c4b73c06cada183c2d509d3c82e6..cf65c08b94fe2198d817cd94b086976421923bec 100644 (file)
--- 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);
index 01cdfd842c3ff7a7086e51961c7332b319e33c0f..57dab354be15443082e0b9b9b9112ce65af7ffa6 100644 (file)
@@ -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);