Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a263a883 authored by George Burgess IV's avatar George Burgess IV
Browse files

snapuserd: fix a use of an uninitialized value

`header` is only initialized in the `if` block of this condition. Hence,
its use in the `else` portion isn't correct. Refactor the code a bit to
make this kind of bug a bit harder to write in the future.

Caught by the static analyzer:
> system/core/fs_mgr/libsnapshot/snapuserd.cpp:457:9: warning: 1st
function call argument is an uninitialized value
[clang-analyzer-core.CallAndMessage]

Bug: None
Test: TreeHugger

Change-Id: Ie56578520acf3cc972efa3336e40698feed20200
parent d57652f1
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment