Skip to content

Commit

Permalink
chore: remove unnecessary identifier (sysctl_nr_open_max)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrichardrinehart committed May 11, 2024
1 parent 4673cac commit 19e7859
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,11 +1259,9 @@ static void bump_file_max_and_nr_open(void) {
* designed to prevent overflows when determining the maximum number of possible file descriptors. */
#define BITS_PER_LONG __WORDSIZE
#define __const_min(x, y) ((x) < (y) ? (x) : (y))
unsigned sysctl_nr_open_max =
unsigned v =
__const_min(INT_MAX, ~(size_t)0/sizeof(void *)) & -BITS_PER_LONG;

unsigned v = sysctl_nr_open_max;

for (;;) {
if (v < 1024) {
log_warning("Can't bump fs.nr_open, value too small.");
Expand Down

0 comments on commit 19e7859

Please sign in to comment.