From: Ville Skyttä Date: Tue, 21 Jun 2016 07:22:39 +0000 (+0300) Subject: Fix some cppcheck style suggestions X-Git-Tag: v3.2.6~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=203d5e5c488a5dbda344d399de19f3c76dd95177;p=thirdparty%2Fccache.git Fix some cppcheck style suggestions --- diff --git a/ccache.c b/ccache.c index 1197e618e..d173df28c 100644 --- 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 { diff --git a/hashtable.c b/hashtable.c index 5340383a8..02ab45427 100644 --- a/hashtable.c +++ b/hashtable.c @@ -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; }