Re: [PATCH] ext4: extents: Remove unnecessary ‘NULL’ values from ablocks
From: Theodore Ts'o
Date: Mon Apr 01 2024 - 23:55:55 EST
On Tue, Apr 02, 2024 at 10:48:04AM +0800, Li zeming wrote:
> ablocks is assigned first, so it does not need to initialize the
> assignment.
That's technically true, but the compiler is perfectly capable of
optimizing it out. So it's harmless, and removing it does make the
code a bit more fragile, since it needs to be set so that the cleanup
code doesn't accidentally dereference an uninitialized pointer.
Cheers,
- Ted