From: Joel Rosdahl Date: Sun, 10 Nov 2019 20:35:11 +0000 (+0100) Subject: Format code with uncrustify X-Git-Tag: v3.7.6~5 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=fc3c84ce9bce8444b239246eb8f8f03030f62bba;p=thirdparty%2Fccache.git Format code with uncrustify --- diff --git a/src/ccache.c b/src/ccache.c index 8bdf2a1dd..00d35a36a 100644 --- a/src/ccache.c +++ b/src/ccache.c @@ -485,7 +485,7 @@ clean_up_internal_tempdir(void) time_t now = time(NULL); struct stat st; if (x_stat(conf->cache_dir, &st) != 0 - || st.st_mtime + k_tempdir_cleanup_interval >= now) { + || st.st_mtime + k_tempdir_cleanup_interval >= now) { // No cleanup needed. return; } @@ -505,7 +505,7 @@ clean_up_internal_tempdir(void) char *path = format("%s/%s", temp_dir(), entry->d_name); if (x_lstat(path, &st) == 0 - && st.st_mtime + k_tempdir_cleanup_interval < now) { + && st.st_mtime + k_tempdir_cleanup_interval < now) { tmp_unlink(path); } free(path); diff --git a/src/confitems.c b/src/confitems.c index 1c2446410..d9d14bdd5 100644 --- a/src/confitems.c +++ b/src/confitems.c @@ -20,7 +20,7 @@ static char * format_string(const void *value) { - const char * const *str = (const char * const*)value; + const char *const *str = (const char *const *)value; return x_strdup(*str); } @@ -268,7 +268,7 @@ confitem_format_unsigned(const void *value) bool confitem_verify_absolute_path(const void *value, char **errmsg) { - const char * const *path = (const char * const *)value; + const char *const *path = (const char *const *)value; assert(*path); if (str_eq(*path, "")) { // The empty string means "disable" in this case. diff --git a/src/util.c b/src/util.c index 2dbe6652c..262aa6a62 100644 --- a/src/util.c +++ b/src/util.c @@ -1227,8 +1227,7 @@ localtime_r(const time_t *timep, struct tm *result) if (tm) { *result = *tm; return result; - } - else { + } else { memset(result, 0, sizeof(*result)); return NULL; } diff --git a/unittest/test_conf.c b/unittest/test_conf.c index 886bd2853..7dba8571c 100644 --- a/unittest/test_conf.c +++ b/unittest/test_conf.c @@ -369,7 +369,8 @@ TEST(conf_set_new_value) char *data; create_file("ccache.conf", "path = vanilla\n"); - CHECKM(conf_set_value_in_file("ccache.conf", "compiler", "chocolate", &errmsg), + CHECKM(conf_set_value_in_file("ccache.conf", "compiler", "chocolate", + &errmsg), errmsg); data = read_text_file("ccache.conf", 0); CHECK(data);