]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Minor style tweaks
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 4 Feb 2015 20:17:36 +0000 (21:17 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 19 Apr 2015 11:33:17 +0000 (13:33 +0200)
ccache.c

index 46bee3082e195ddbd18e592127523634244ee43b..184c300a5787bb26c6e0c573219a5c7dada46597 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -158,7 +158,7 @@ static struct hashtable *included_files;
 /* is gcc being asked to output dependencies? */
 static bool generating_dependencies;
 
-/* is gcc being asked to output coverage ? */
+/* is gcc being asked to output coverage? */
 static bool generating_coverage;
 
 /* is gcc being asked to output coverage data (.gcda) at runtime? */
@@ -1601,11 +1601,9 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest)
        if (produce_dep_file) {
                get_file_from_cache(cached_dep, output_dep);
        }
-       if (generating_coverage) {
+       if (generating_coverage && stat(cached_cov, &st) == 0 && st.st_size > 0) {
                /* gcc won't generate notes if there is no code */
-               if (stat(cached_cov, &st) == 0 && st.st_size > 0) {
-                       get_file_from_cache(cached_cov, output_cov);
-               }
+               get_file_from_cache(cached_cov, output_cov);
        }
        if (output_dia) {
                get_file_from_cache(cached_dia, output_dia);
@@ -1979,7 +1977,7 @@ cc_process_args(struct args *args, struct args **preprocessor_args,
                        args_add(stripped_args, argv[i]);
                        continue;
                }
-               if (str_eq(argv[i], "--coverage") /* == -fprofile-arcs -ftest-coverage */ ) {
+               if (str_eq(argv[i], "--coverage")) { /* = -fprofile-arcs -ftest-coverage */
                        profile_arcs = true;
                        generating_coverage = true;
                        args_add(stripped_args, argv[i]);