Re: [PATCH v2 06/11] mirror: Minor refactoring

2025-04-17 Thread Stefan Hajnoczi
On Thu, Apr 17, 2025 at 01:39:11PM -0500, Eric Blake wrote: > Commit 5791ba52 (v9.2) pre-initialized ret in mirror_dirty_init to > silence a false positive compiler warning, even though in all code > paths where ret is used, it was guaranteed to be reassigned > beforehand. But since the function r

[PATCH v2 06/11] mirror: Minor refactoring

2025-04-17 Thread Eric Blake
Commit 5791ba52 (v9.2) pre-initialized ret in mirror_dirty_init to silence a false positive compiler warning, even though in all code paths where ret is used, it was guaranteed to be reassigned beforehand. But since the function returns -errno, and -1 is not always the right errno, it's better to