[PATCH] fs/UBIFS: make 'sum' definition closer to where it is used

Richard Weinberger richard at nod.at
Thu Mar 1 08:26:19 PST 2018


Am Mittwoch, 28. Februar 2018, 03:42:03 CET schrieb Liu Song:
> Local var sum is only used in one branch, and it may be not used if
> it is defined outside the branch. Try to move the definition into
> the branch to make it closer to where it is actually used.

Does this fix a problem?
I'm not a huge fan of defining variables in the middle of functions unless it 
makes the code really better.

Thanks,
//richard




More information about the linux-mtd mailing list