Commit f57a33b
net: use min() instead of min_t()
min_t(unsigned int, a, b) casts an 'unsigned long' to 'unsigned int'.
Use min(a, b) instead as it promotes any 'unsigned int' to 'unsigned long'
and so cannot discard significant bits.
In this case the 'unsigned long' value is small enough that the result
is ok.
Detected by an extra check added to min_t().
Signed-off-by: David Laight <[email protected]>1 parent 4c10477 commit f57a33b
File tree
9 files changed
+17
-20
lines changed- net
- core
- ipv4
- ipv6
- packet
- unix
9 files changed
+17
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
985 | 985 | | |
986 | 986 | | |
987 | 987 | | |
988 | | - | |
989 | | - | |
| 988 | + | |
990 | 989 | | |
991 | 990 | | |
992 | 991 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
710 | 710 | | |
711 | 711 | | |
712 | 712 | | |
713 | | - | |
| 713 | + | |
714 | 714 | | |
715 | 715 | | |
716 | 716 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2870 | 2870 | | |
2871 | 2871 | | |
2872 | 2872 | | |
2873 | | - | |
| 2873 | + | |
2874 | 2874 | | |
2875 | 2875 | | |
2876 | 2876 | | |
| |||
3323 | 3323 | | |
3324 | 3324 | | |
3325 | 3325 | | |
3326 | | - | |
| 3326 | + | |
3327 | 3327 | | |
3328 | 3328 | | |
3329 | 3329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3076 | 3076 | | |
3077 | 3077 | | |
3078 | 3078 | | |
3079 | | - | |
| 3079 | + | |
3080 | 3080 | | |
3081 | 3081 | | |
3082 | 3082 | | |
| |||
4382 | 4382 | | |
4383 | 4383 | | |
4384 | 4384 | | |
4385 | | - | |
4386 | | - | |
| 4385 | + | |
4387 | 4386 | | |
4388 | 4387 | | |
4389 | 4388 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
507 | | - | |
| 507 | + | |
508 | 508 | | |
509 | 509 | | |
510 | 510 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1422 | 1422 | | |
1423 | 1423 | | |
1424 | 1424 | | |
1425 | | - | |
1426 | | - | |
| 1425 | + | |
| 1426 | + | |
1427 | 1427 | | |
1428 | | - | |
1429 | | - | |
| 1428 | + | |
| 1429 | + | |
1430 | 1430 | | |
1431 | 1431 | | |
1432 | 1432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
1734 | | - | |
1735 | | - | |
1736 | | - | |
| 1734 | + | |
| 1735 | + | |
1737 | 1736 | | |
1738 | 1737 | | |
1739 | 1738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3015 | 3015 | | |
3016 | 3016 | | |
3017 | 3017 | | |
3018 | | - | |
| 3018 | + | |
3019 | 3019 | | |
3020 | 3020 | | |
3021 | 3021 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2448 | 2448 | | |
2449 | 2449 | | |
2450 | 2450 | | |
2451 | | - | |
| 2451 | + | |
2452 | 2452 | | |
2453 | 2453 | | |
2454 | 2454 | | |
| |||
3054 | 3054 | | |
3055 | 3055 | | |
3056 | 3056 | | |
3057 | | - | |
| 3057 | + | |
3058 | 3058 | | |
3059 | 3059 | | |
3060 | 3060 | | |
| |||
0 commit comments