From: Eero Tamminen Date: Fri, 4 Feb 2022 10:24:40 +0000 (+0200) Subject: turbostat, format_json: Satisfy clang-format CI check X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=153678dc18f8f1759c311b2cdf7c4d3f14c3c898;p=thirdparty%2Fcollectd.git turbostat, format_json: Satisfy clang-format CI check CI has changed since this code was added to collectd. Signed-off-by: Eero Tamminen --- diff --git a/src/turbostat.c b/src/turbostat.c index 27a04655b..0716f8381 100644 --- a/src/turbostat.c +++ b/src/turbostat.c @@ -180,7 +180,7 @@ static struct thread_data { unsigned int flags; #define CPU_IS_FIRST_THREAD_IN_CORE 0x2 #define CPU_IS_FIRST_CORE_IN_PACKAGE 0x4 -} * thread_delta, *thread_even, *thread_odd; +} *thread_delta, *thread_even, *thread_odd; static struct core_data { unsigned long long c3; @@ -188,7 +188,7 @@ static struct core_data { unsigned long long c7; unsigned int core_temp_c; unsigned int core_id; -} * core_delta, *core_even, *core_odd; +} *core_delta, *core_even, *core_odd; static struct pkg_data { unsigned long long pc2; @@ -209,7 +209,7 @@ static struct pkg_data { uint32_t uncore; unsigned int tcc_activation_temp; unsigned int pkg_temp_c; -} * package_delta, *package_even, *package_odd; +} *package_delta, *package_even, *package_odd; #define DELTA_COUNTERS thread_delta, core_delta, package_delta #define ODD_COUNTERS thread_odd, core_odd, package_odd @@ -1464,9 +1464,9 @@ static void free_all_buffers(void) { package_delta = NULL; } - /********************** - * Collectd functions * - **********************/ +/********************** + * Collectd functions * + **********************/ #define DO_OR_GOTO_ERR(something) \ do { \ diff --git a/src/utils/format_json/format_json.c b/src/utils/format_json/format_json.c index dc4968a31..3b174f95f 100644 --- a/src/utils/format_json/format_json.c +++ b/src/utils/format_json/format_json.c @@ -605,11 +605,10 @@ static int format_alert(yajl_gen g, notification_t const *n) /* {{{ */ CHECK_SUCCESS(yajl_gen_map_open(g)); /* BEGIN annotations */ JSON_ADD(g, "severity"); - JSON_ADD(g, (n->severity == NOTIF_FAILURE) - ? "FAILURE" - : (n->severity == NOTIF_WARNING) - ? "WARNING" - : (n->severity == NOTIF_OKAY) ? "OKAY" : "UNKNOWN"); + JSON_ADD(g, (n->severity == NOTIF_FAILURE) ? "FAILURE" + : (n->severity == NOTIF_WARNING) ? "WARNING" + : (n->severity == NOTIF_OKAY) ? "OKAY" + : "UNKNOWN"); JSON_ADD(g, "summary"); JSON_ADD(g, n->message);