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

Ticket31532 #1291

Merged
merged 6 commits into from Sep 5, 2019
Merged

Ticket31532 #1291

merged 6 commits into from Sep 5, 2019

Conversation

Labels
None yet
Projects
None yet
3 participants
@nmathewson
Copy link
Contributor

@nmathewson nmathewson commented Sep 4, 2019

No description provided.

Previously we used int here, but it is more correct to use
ptrdiff_t.  (This never actually matters for our code in practice,
since the structure we are managing here never exceed INT_MAX in
size.)
@coveralls
Copy link

@coveralls coveralls commented Sep 4, 2019

Pull Request Test Coverage Report for Build 6054

  • 4 of 4 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 63.055%

Totals Coverage Status
Change from base Build 6051: 0.0%
Covered Lines: 47620
Relevant Lines: 75521

💛 - Coveralls

nmathewson added 5 commits Sep 4, 2019
This is technically correct, but should not matter in practice,
since we don't use this on any structs whose size exceeds INT_MAX.
Previously we had said that off_t was a reasonable type to hold the
result of offsetof().  That isn't so: ptrdiff_t is correct.
The off_t type is only useful for offsets on the filesystem.  For
in-memory offsets, use ptrdiff_t.
Previously we used int in some places and off_t for others.  Neither
is correct: ptrdiff_t is right for differences between pointers.
(off_t is only for offsets and sizes on the filesystem.)
@torproject-pusher torproject-pusher merged commit 106b75a into torproject:master Sep 5, 2019
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment