|
|
|
|
|
by trealira
920 days ago
|
|
> Then `SYS_kbind` seems to be a signed int. So this comparison will be signed and "fix" the negative `npins` to `SYS_kbind`: npins = MAX(npins, SYS_kbind)
No, the comparison is unsigned here. They're integers of the same "conversion rank", so the unsigned type wins and the signed integer is interpreted as unsigned.https://en.cppreference.com/w/c/language/conversion I can never remember the integer conversion rules and end up looking up this link whenever necessary. |
|