diff options
| author | Andre Muezerie <[email protected]> | 2026-05-14 16:53:59 -0400 |
|---|---|---|
| committer | Andre Muezerie <[email protected]> | 2026-05-14 16:53:59 -0400 |
| commit | 566fe957730ddd523930ae1a82ec7bdee48e87af (patch) | |
| tree | 7e5dceed7fedaa5899d15b1062eb5779061c2a51 | |
| parent | d7ba74afdcff77fd65180d14a429937f93000779 (diff) | |
netvmini/rssv2: fix mixed-width comparison in processor lookup loop
Summary
This PR addresses a static-analysis warning in rssv2.c related to comparing values of different integer widths in a loop condition.
Changes
- Updated the loop index type in NICSetRSSv2FindProcessorInRssSet from UINT8 to ULONG to match RssProcessorCount width.
- Added an explicit cast when returning the found index: return (UINT8)index; to preserve the function’s return type and behavior.
Why
Using matching integer widths in loop comparisons avoids analyzer warnings and reduces risk of subtle boundary issues.
Impact
No functional behavior change is intended; this is a type-safety and code-quality fix for warning cleanup.
| -rw-r--r-- | network/ndis/netvmini/6x/rssv2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/network/ndis/netvmini/6x/rssv2.c b/network/ndis/netvmini/6x/rssv2.c index 1f8efb0e..3f185c8a 100644 --- a/network/ndis/netvmini/6x/rssv2.c +++ b/network/ndis/netvmini/6x/rssv2.c @@ -210,7 +210,7 @@ Return Value: --*/ { - UINT8 index; + ULONG index; PNDIS_RSS_PROCESSOR processor; for (index = 0; @@ -222,7 +222,7 @@ Return Value: if ((processor->ProcNum.Group == ProcessorNumber.Group) && (processor->ProcNum.Number == ProcessorNumber.Number)) { - return index; + return (UINT8)index; } } |
