diff options
author | RincewindsHat <12514511+RincewindsHat@users.noreply.github.com> | 2023-03-05 15:37:47 +0100 |
---|---|---|
committer | Lorenz Kästle <lorenz.kaestle@netways.de> | 2023-09-22 15:22:57 +0200 |
commit | 7fd0e6f36d90a341e0d9b418f1cd64a3a5472a94 (patch) | |
tree | 5d636105100a6b4ce79d3f0074f9e60dc27a1577 /plugins/utils.c | |
parent | 7f460dd60a73a6e20d03a2312e8bb8fa80e5cdf6 (diff) | |
download | monitoring-plugins-7fd0e6f.tar.gz |
Rework maxfd/open_max to avoid unused variables
Diffstat (limited to 'plugins/utils.c')
-rw-r--r-- | plugins/utils.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/plugins/utils.c b/plugins/utils.c index b4214c61..71c0bdd8 100644 --- a/plugins/utils.c +++ b/plugins/utils.c | |||
@@ -804,19 +804,3 @@ char *sperfdata_int (const char *label, | |||
804 | 804 | ||
805 | return data; | 805 | return data; |
806 | } | 806 | } |
807 | |||
808 | int | ||
809 | open_max (void) | ||
810 | { | ||
811 | errno = 0; | ||
812 | if (maxfd > 0) | ||
813 | return(maxfd); | ||
814 | |||
815 | if ((maxfd = sysconf (_SC_OPEN_MAX)) < 0) { | ||
816 | if (errno == 0) | ||
817 | maxfd = DEFAULT_MAXFD; /* it's indeterminate */ | ||
818 | else | ||
819 | die (STATE_UNKNOWN, _("sysconf error for _SC_OPEN_MAX\n")); | ||
820 | } | ||
821 | return(maxfd); | ||
822 | } | ||