From 802e46f8ea36c344f112d7e1dd8d64d17a4cc939 Mon Sep 17 00:00:00 2001 From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> Date: Mon, 15 Sep 2025 12:59:37 +0200 Subject: Run clang-format again --- plugins/utils.c | 35 ++++++++++++++++++++--------------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'plugins/utils.c') diff --git a/plugins/utils.c b/plugins/utils.c index 34335c89..41fe5fcf 100644 --- a/plugins/utils.c +++ b/plugins/utils.c @@ -285,7 +285,8 @@ double delta_time(struct timeval tv) { struct timeval now; gettimeofday(&now, NULL); - return ((double)(now.tv_sec - tv.tv_sec) + (double)(now.tv_usec - tv.tv_usec) / (double)1000000); + return ((double)(now.tv_sec - tv.tv_sec) + + (double)(now.tv_usec - tv.tv_usec) / (double)1000000); } long deltime(struct timeval tv) { @@ -507,8 +508,8 @@ int xasprintf(char **strp, const char *fmt, ...) { * ******************************************************************************/ -char *perfdata(const char *label, long int val, const char *uom, bool warnp, long int warn, bool critp, long int crit, bool minp, - long int minv, bool maxp, long int maxv) { +char *perfdata(const char *label, long int val, const char *uom, bool warnp, long int warn, + bool critp, long int crit, bool minp, long int minv, bool maxp, long int maxv) { char *data = NULL; if (strpbrk(label, "'= ")) { @@ -542,10 +543,11 @@ char *perfdata(const char *label, long int val, const char *uom, bool warnp, lon return data; } -char *perfdata_uint64(const char *label, uint64_t val, const char *uom, bool warnp, /* Warning present */ - uint64_t warn, bool critp, /* Critical present */ - uint64_t crit, bool minp, /* Minimum present */ - uint64_t minv, bool maxp, /* Maximum present */ +char *perfdata_uint64(const char *label, uint64_t val, const char *uom, + bool warnp, /* Warning present */ + uint64_t warn, bool critp, /* Critical present */ + uint64_t crit, bool minp, /* Minimum present */ + uint64_t minv, bool maxp, /* Maximum present */ uint64_t maxv) { char *data = NULL; @@ -580,10 +582,11 @@ char *perfdata_uint64(const char *label, uint64_t val, const char *uom, bool war return data; } -char *perfdata_int64(const char *label, int64_t val, const char *uom, bool warnp, /* Warning present */ - int64_t warn, bool critp, /* Critical present */ - int64_t crit, bool minp, /* Minimum present */ - int64_t minv, bool maxp, /* Maximum present */ +char *perfdata_int64(const char *label, int64_t val, const char *uom, + bool warnp, /* Warning present */ + int64_t warn, bool critp, /* Critical present */ + int64_t crit, bool minp, /* Minimum present */ + int64_t minv, bool maxp, /* Maximum present */ int64_t maxv) { char *data = NULL; @@ -618,8 +621,8 @@ char *perfdata_int64(const char *label, int64_t val, const char *uom, bool warnp return data; } -char *fperfdata(const char *label, double val, const char *uom, bool warnp, double warn, bool critp, double crit, bool minp, double minv, - bool maxp, double maxv) { +char *fperfdata(const char *label, double val, const char *uom, bool warnp, double warn, bool critp, + double crit, bool minp, double minv, bool maxp, double maxv) { char *data = NULL; if (strpbrk(label, "'= ")) { @@ -655,7 +658,8 @@ char *fperfdata(const char *label, double val, const char *uom, bool warnp, doub return data; } -char *sperfdata(const char *label, double val, const char *uom, char *warn, char *crit, bool minp, double minv, bool maxp, double maxv) { +char *sperfdata(const char *label, double val, const char *uom, char *warn, char *crit, bool minp, + double minv, bool maxp, double maxv) { char *data = NULL; if (strpbrk(label, "'= ")) { xasprintf(&data, "'%s'=", label); @@ -690,7 +694,8 @@ char *sperfdata(const char *label, double val, const char *uom, char *warn, char return data; } -char *sperfdata_int(const char *label, int val, const char *uom, char *warn, char *crit, bool minp, int minv, bool maxp, int maxv) { +char *sperfdata_int(const char *label, int val, const char *uom, char *warn, char *crit, bool minp, + int minv, bool maxp, int maxv) { char *data = NULL; if (strpbrk(label, "'= ")) { xasprintf(&data, "'%s'=", label); -- cgit v1.2.3-74-g34f1