mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-08-14 07:23:38 -04:00
ldpctool: fix uninitialized variable in vzero
Fix Coverity CID 652347 reporting an uninitialized scalar variable. Replace XOR self-assignment with explicit zero initialization to avoid reading uninitialized SIMD elements. Modern compilers already optimize zero assignments to efficient zeroing instructions where appropriate. Signed-off-by: Robin Getz <rgetz503@gmail.com>
This commit is contained in:
@@ -146,7 +146,7 @@ static inline TYPE vzero()
|
||||
{
|
||||
TYPE tmp;
|
||||
for (int i = 0; i < TYPE::SIZE; ++i)
|
||||
tmp.u[i] ^= tmp.u[i];
|
||||
tmp.u[i] = 0;
|
||||
return tmp;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user