Merge pull request #4594 from liewegas/wip-librbd-warning

librbd: fix warning

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2015-05-06 18:11:21 -04:00
commit 1fc4b1bbbc

View File

@ -839,10 +839,11 @@ namespace librbd {
ImageCtx *ictx = (ImageCtx *)ctx;
tracepoint(librbd, metadata_get_enter, ictx, key.c_str());
int r = librbd::metadata_get(ictx, key, value);
if (r < 0)
if (r < 0) {
tracepoint(librbd, metadata_get_exit, r, key.c_str(), NULL);
else
} else {
tracepoint(librbd, metadata_get_exit, r, key.c_str(), value->c_str());
}
return r;
}