Skip to content

Commit

Permalink
rbd: Uninitialized variable used handle_refresh()
Browse files Browse the repository at this point in the history
Fixed:

** CID 1403249 (#1 of 1): Uninitialized scalar variable (UNINIT)
6. uninit_use: Using uninitialized value snap_protected.

Signed-off-by: Amit Kumar amitkuma@redhat.com
  • Loading branch information
amitkuma committed Aug 1, 2017
1 parent a8c2b10 commit f31d54c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librbd/image/CloneRequest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ template <typename I>
void CloneRequest<I>::handle_refresh(int r) {
ldout(m_cct, 20) << this << " " << __func__ << " r=" << r << dendl;

bool snap_protected;
bool snap_protected = false;
if (r == 0) {
m_p_imctx->snap_lock.get_read();
r = m_p_imctx->is_snap_protected(m_p_imctx->snap_id, &snap_protected);
Expand Down

0 comments on commit f31d54c

Please sign in to comment.