diff options
author | Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com> | 2023-09-23 10:47:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 10:47:01 +0200 |
commit | 719e27ddc2f0b48bcd7fe5584b23e3ce83ddf291 (patch) | |
tree | 1ca6c622275cf8d57e0b6b6d7fb0da4cce8e9205 /plugins/utils.c | |
parent | fe718dec117a7adb8a7107a4137a86c79b54d15f (diff) | |
parent | 4295decfbf06adfa1bf019d28e9044971607b2d6 (diff) | |
download | monitoring-plugins-719e27d.tar.gz |
Merge pull request #1924 from RincewindsHat/compiler_warnings_4_1
Centralise and refactor maxfd related functionality
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 | } | ||