Skip to content

Commit

Permalink
chore: remove unnecessary bitwise arithmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrichardrinehart committed May 10, 2024
1 parent c494d81 commit 0604d5d
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 @@ -1253,8 +1253,6 @@ static void bump_file_max_and_nr_open(void) {
#endif

#if BUMP_PROC_SYS_FS_NR_OPEN
unsigned v = INT_MAX;

/* cf. https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/file.c?h=v6.8#n27
* for the progeny of the below value for `sysctl_nr_open_max`. Note
* that the below logic was first introduced in `git` commit
Expand All @@ -1269,7 +1267,7 @@ static void bump_file_max_and_nr_open(void) {
for (;;) {
unsigned k;

v &= sysctl_nr_open_max;
unsigned v &= sysctl_nr_open_max;

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

0 comments on commit 0604d5d

Please sign in to comment.