summaryrefslogtreecommitdiff
path: root/multipathd
diff options
context:
space:
mode:
Diffstat (limited to 'multipathd')
-rw-r--r--multipathd/main.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/multipathd/main.c b/multipathd/main.c
index dfa1098..41a9bd0 100644
--- a/multipathd/main.c
+++ b/multipathd/main.c
@@ -1373,14 +1373,9 @@ child (void * param)
if (conf->max_fds) {
struct rlimit fd_limit;
- if (conf->max_fds > 0) {
- fd_limit.rlim_cur = conf->max_fds;
- fd_limit.rlim_max = conf->max_fds;
- }
- else {
- fd_limit.rlim_cur = RLIM_INFINITY;
- fd_limit.rlim_max = RLIM_INFINITY;
- }
+
+ fd_limit.rlim_cur = conf->max_fds;
+ fd_limit.rlim_max = conf->max_fds;
if (setrlimit(RLIMIT_NOFILE, &fd_limit) < 0)
condlog(0, "can't set open fds limit to %d : %s\n",
conf->max_fds, strerror(errno));