]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Fix some cppcheck style suggestions
authorVille Skyttä <ville.skytta@iki.fi>
Tue, 21 Jun 2016 07:22:39 +0000 (10:22 +0300)
committerJoel Rosdahl <joel@rosdahl.net>
Mon, 11 Jul 2016 19:35:58 +0000 (21:35 +0200)
ccache.c
hashtable.c

index 1197e618e55c35fda8a67c14bf35c8c512a3ed5b..d173df28c0548269c84382169ca4a71f435a4a96 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -1122,7 +1122,7 @@ to_cache(struct args *args)
                cc_log("Stored in cache: %s", cached_stderr);
                if (!conf->compression
                    /* If the file was compressed, obtain the size again: */
-                   || (conf->compression && x_stat(cached_stderr, &st) == 0)) {
+                   || x_stat(cached_stderr, &st) == 0) {
                        stats_update_size(file_size(&st), 1);
                }
        } else {
index 5340383a87ee15b1524faf6e7a8c62293acb1195..02ab45427fadc890928e8e4b8583660b6e230c38 100644 (file)
@@ -102,7 +102,6 @@ hashtable_expand(struct hashtable *h)
     /* Double the size of the table to accommodate more entries */
     struct entry **newtable;
     struct entry *e;
-    struct entry **pE;
     unsigned int newsize, i, index;
     /* Check we're not hitting max capacity */
     if (h->primeindex == (prime_table_length - 1)) return 0;
@@ -128,6 +127,7 @@ hashtable_expand(struct hashtable *h)
     /* Plan B: realloc instead */
     else 
     {
+        struct entry **pE;
         newtable = (struct entry **)
                    realloc(h->table, newsize * sizeof(struct entry *));
         if (NULL == newtable) { (h->primeindex)--; return 0; }