1
0
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:
Robin Getz
2026-08-02 20:24:28 -04:00
parent 4b1a910c12
commit 99da6143dc
+1 -1
View File
@@ -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;
}