Skip to content

Commit

Permalink
librbd/exclusive_lock/AcquireRequest.cc: init lock_type
Browse files Browse the repository at this point in the history
Fixup for:

CID 1351687 (#1 of 1): Uninitialized scalar variable (UNINIT)
 var_decl: Declaring variable lock_type without initializer
 uninit_use: Using uninitialized value lock_type.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
(cherry picked from commit da9ede9)
  • Loading branch information
dalgaaf authored and Jason Dillaman committed Jan 30, 2017
1 parent d4085d3 commit 652e65a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librbd/exclusive_lock/AcquireRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ Context *AcquireRequest<I>::handle_get_lockers(int *ret_val) {

std::map<rados::cls::lock::locker_id_t,
rados::cls::lock::locker_info_t> lockers;
ClsLockType lock_type;
ClsLockType lock_type = LOCK_NONE;
std::string lock_tag;
if (*ret_val == 0) {
bufferlist::iterator it = m_out_bl.begin();
Expand Down

0 comments on commit 652e65a

Please sign in to comment.