Skip to content

Commit

Permalink
chore: simplify comparison logic
Browse files Browse the repository at this point in the history
  • Loading branch information
johnrichardrinehart committed May 10, 2024
1 parent 4db5471 commit 7ee0a15
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1267,8 +1267,6 @@ static void bump_file_max_and_nr_open(void) {
unsigned v = sysctl_nr_open_max;

for (;;) {
unsigned k;

if (v < 1024) {
log_warning("Can't bump fs.nr_open, value too small.");
break;
Expand All @@ -1280,8 +1278,7 @@ static void bump_file_max_and_nr_open(void) {
break;
}

k = (unsigned)(nr_open);
if (k >= v) { /* Already larger */
if ((unsigned)nr_open >= v) { /* Already larger */
log_debug("Skipping bump, value is already larger.");
break;
}
Expand Down

0 comments on commit 7ee0a15

Please sign in to comment.