Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix off-by-one error in range check of Backlog::new #2500

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

fkm3
Copy link
Contributor

@fkm3 fkm3 commented Sep 13, 2024

What does this PR do

Makes it possible to call Backlog::new(libc::SOMAXCONN) without error.

In the case where I encountered this, a constant is passed to Backlog::new
and it just happens to be equal to SOMAXCONN on some platforms.

Checklist:

  • I have read CONTRIBUTING.md
  • I have written necessary tests and rustdoc comments
  • A change log has been added if this PR modifies nix's API

@fkm3
Copy link
Contributor Author

fkm3 commented Sep 13, 2024

The CI failure looks clearly unrelated

error: missing documentation for a function
   --> src/features.rs:95:5
    |
95  |     pub fn test_parsing_kernel_version() {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |

@SteveLauC SteveLauC self-requested a review September 14, 2024 02:58
Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for catching it!

CI failure is not related, I will give it a fix.

@SteveLauC
Copy link
Member

Hi, CI fixed in #2501, please rebase your branch:)

@fkm3
Copy link
Contributor Author

fkm3 commented Sep 16, 2024

Thanks! Rebased and rerunning checks now

Copy link
Member

@SteveLauC SteveLauC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the patch!

@SteveLauC SteveLauC added this pull request to the merge queue Sep 17, 2024
Merged via the queue into nix-rust:master with commit a0869f9 Sep 17, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants