From 880e57271d66b34240b58bdbeaf9d53a08958eb2 Mon Sep 17 00:00:00 2001 From: RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> Date: Thu, 31 Oct 2024 01:30:50 +0100 Subject: lib: clang-format --- lib/utils_base.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'lib/utils_base.c') diff --git a/lib/utils_base.c b/lib/utils_base.c index 6d6954ef..90a4aaa5 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c @@ -33,12 +33,12 @@ #include #include -#define np_free(ptr) \ - { \ - if (ptr) { \ - free(ptr); \ - ptr = NULL; \ - } \ +#define np_free(ptr) \ + { \ + if (ptr) { \ + free(ptr); \ + ptr = NULL; \ + } \ } monitoring_plugin *this_monitoring_plugin = NULL; @@ -511,7 +511,8 @@ void np_enable_state(char *keyname, int expected_data_version) { this_state->state_data = NULL; /* Calculate filename */ - ret = asprintf(&temp_filename, "%s/%lu/%s/%s", _np_state_calculate_location_prefix(), (unsigned long)geteuid(), this_monitoring_plugin->plugin_name, this_state->name); + ret = asprintf(&temp_filename, "%s/%lu/%s/%s", _np_state_calculate_location_prefix(), (unsigned long)geteuid(), + this_monitoring_plugin->plugin_name, this_state->name); if (ret < 0) die(STATE_UNKNOWN, _("Cannot allocate memory: %s"), strerror(errno)); @@ -568,7 +569,13 @@ bool _np_state_read_file(FILE *f) { int i; int failure = 0; time_t current_time, data_time; - enum { STATE_FILE_VERSION, STATE_DATA_VERSION, STATE_DATA_TIME, STATE_DATA_TEXT, STATE_DATA_END } expected = STATE_FILE_VERSION; + enum { + STATE_FILE_VERSION, + STATE_DATA_VERSION, + STATE_DATA_TIME, + STATE_DATA_TEXT, + STATE_DATA_END + } expected = STATE_FILE_VERSION; time(¤t_time); -- cgit v1.2.3-74-g34f1