From ee1ba3209993b72e90f5fe30a16ad951f1e2402d Mon Sep 17 00:00:00 2001 From: Lorenz Kästle Date: Thu, 17 Oct 2024 17:57:50 +0200 Subject: lib: clang-format --- lib/maxfd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/maxfd.c') diff --git a/lib/maxfd.c b/lib/maxfd.c index 529b3568..c39d427c 100644 --- a/lib/maxfd.c +++ b/lib/maxfd.c @@ -1,7 +1,7 @@ #include "./maxfd.h" #include -long mp_open_max (void) { +long mp_open_max(void) { long maxfd = 0L; /* Try sysconf(_SC_OPEN_MAX) first, as it can be higher than OPEN_MAX. * If that fails and the macro isn't defined, we fall back to an educated @@ -10,17 +10,17 @@ long mp_open_max (void) { #ifdef _SC_OPEN_MAX errno = 0; - if ((maxfd = sysconf (_SC_OPEN_MAX)) < 0) { + if ((maxfd = sysconf(_SC_OPEN_MAX)) < 0) { if (errno == 0) - maxfd = DEFAULT_MAXFD; /* it's indeterminate */ + maxfd = DEFAULT_MAXFD; /* it's indeterminate */ else - die (STATE_UNKNOWN, _("sysconf error for _SC_OPEN_MAX\n")); + die(STATE_UNKNOWN, _("sysconf error for _SC_OPEN_MAX\n")); } #elif defined(OPEN_MAX) return OPEN_MAX -#else /* sysconf macro unavailable, so guess (may be wildly inaccurate) */ +#else /* sysconf macro unavailable, so guess (may be wildly inaccurate) */ return DEFAULT_MAXFD; #endif - return(maxfd); + return (maxfd); } -- cgit v1.2.3-74-g34f1 From 9462819774ed2e3f51c75fffda59724428205c0e Mon Sep 17 00:00:00 2001 From: Lorenz Kästle Date: Thu, 17 Oct 2024 18:01:49 +0200 Subject: lib: Update copyright --- lib/extra_opts.c | 2 +- lib/maxfd.c | 20 ++++++++++++++++++++ lib/parse_ini.c | 2 +- lib/utils_base.c | 2 +- lib/utils_cmd.c | 2 +- lib/utils_cmd.h | 1 - lib/utils_disk.c | 2 +- lib/utils_tcp.c | 2 +- 8 files changed, 26 insertions(+), 7 deletions(-) (limited to 'lib/maxfd.c') diff --git a/lib/extra_opts.c b/lib/extra_opts.c index 82460e92..88787336 100644 --- a/lib/extra_opts.c +++ b/lib/extra_opts.c @@ -3,7 +3,7 @@ * Monitoring Plugins extra_opts library * * License: GPL - * Copyright (c) 2007 Monitoring Plugins Development Team + * Copyright (c) 2007 - 2024 Monitoring Plugins Development Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/maxfd.c b/lib/maxfd.c index c39d427c..ca5b6e54 100644 --- a/lib/maxfd.c +++ b/lib/maxfd.c @@ -1,3 +1,23 @@ +/***************************************************************************** + * + * License: GPL + * Copyright (c) 2024 Monitoring Plugins Development Team + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * + *****************************************************************************/ + #include "./maxfd.h" #include diff --git a/lib/parse_ini.c b/lib/parse_ini.c index 150df7b2..873ee8ce 100644 --- a/lib/parse_ini.c +++ b/lib/parse_ini.c @@ -3,7 +3,7 @@ * Monitoring Plugins parse_ini library * * License: GPL - * Copyright (c) 2007 Monitoring Plugins Development Team + * Copyright (c) 2007 - 2024 Monitoring Plugins Development Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/lib/utils_base.c b/lib/utils_base.c index cd135836..6d6954ef 100644 --- a/lib/utils_base.c +++ b/lib/utils_base.c @@ -3,7 +3,7 @@ * utils_base.c * * License: GPL - * Copyright (c) 2006 Monitoring Plugins Development Team + * Copyright (c) 2006 - 2024 Monitoring Plugins Development Team * * Library of useful functions for plugins * diff --git a/lib/utils_cmd.c b/lib/utils_cmd.c index 25d56785..416cf824 100644 --- a/lib/utils_cmd.c +++ b/lib/utils_cmd.c @@ -3,7 +3,7 @@ * Monitoring run command utilities * * License: GPL - * Copyright (c) 2005-2006 Monitoring Plugins Development Team + * Copyright (c) 2005-2024 Monitoring Plugins Development Team * * Description : * diff --git a/lib/utils_cmd.h b/lib/utils_cmd.h index 0fc09173..d00069c9 100644 --- a/lib/utils_cmd.h +++ b/lib/utils_cmd.h @@ -4,7 +4,6 @@ /* * Header file for Monitoring Plugins utils_cmd.c * - * */ /** types **/ diff --git a/lib/utils_disk.c b/lib/utils_disk.c index a317f7da..c87090e8 100644 --- a/lib/utils_disk.c +++ b/lib/utils_disk.c @@ -3,7 +3,7 @@ * Library for check_disk * * License: GPL - * Copyright (c) 1999-2007 Monitoring Plugins Development Team + * Copyright (c) 1999-2024 Monitoring Plugins Development Team * * Description: * diff --git a/lib/utils_tcp.c b/lib/utils_tcp.c index ffb351e6..440eb9b4 100644 --- a/lib/utils_tcp.c +++ b/lib/utils_tcp.c @@ -3,7 +3,7 @@ * Library for check_tcp * * License: GPL - * Copyright (c) 1999-2013 Monitoring Plugins Development Team + * Copyright (c) 1999-2024 Monitoring Plugins Development Team * * Description: * -- cgit v1.2.3-74-g34f1