When comparing 32-bit signed integers we need either to use a 64-bit variable, or check the two cases that can happen. Else we risk incorrect sorting results.
Details
Details
- Reviewers
gallatin gnn - Group Reviewers
transport - Commits
- rS295506: Use a pair of ifs when comparing the 32-bit flowid integers so that
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/netinet/tcp_lro.c | ||
---|---|---|
352 ↗ | (On Diff #13170) | This seems like an overly complicated way to say "return 1" and "return -1". Perhaps you could simplify it, and eliminate the gotos ? |
sys/netinet/tcp_lro.c | ||
---|---|---|
352 ↗ | (On Diff #13170) | It produces the least assembly code vs ret = 1 ... ret = -1. Another alternative is to mask away the 31st bit of the flowid. |
Comment Actions
We are programming in C and not assembler. Please make the requested change to a typically C idiom.