Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't use named return values in layerStore.Put
We will need want to refer to "layer" in a defer block, in order to delete that layer. That doesn't work with "layer" being a named return value, because a (return nil, -1, ...) sets "layer" to nil. So, turn "layer" into a local variable, and use an unnamed return value. And beause all return values must be named, or unnamed, consistently, turn "size" and "err" also into local variables. Then decrease the scope of the "size" and "err" local variables to simplify understanding the code a bit. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
- Loading branch information
Showing
1 changed file
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters