Fixed a bug by changing the ec parameter of erase() to pass the error code by reference, allowing it to correctly update the error state within the method.
Motivation and Context
Prior to this, changes made to the error code by erase() won't affect the original error code outside the method. This fix corrects the signature to reflect the ec convention of the other methods in the Nvs class.
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Documentation Update
[ ] Hardware (schematic, board, system design) change
Description
Fixed a bug by changing the ec parameter of erase() to pass the error code by reference, allowing it to correctly update the error state within the method.
Motivation and Context
Prior to this, changes made to the error code by erase() won't affect the original error code outside the method. This fix corrects the signature to reflect the ec convention of the other methods in the Nvs class.
Types of changes