提交 23671359 编写于 作者: J John Ferlan

rbd: Change virStorageBackendRBDCloseRADOSConn to be static void

Since none of the callers check the status, let's just alter it to
a static void.

While we're at it - scrap the local runtime variable and just do the
math in the VIR_DEBUG directly.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 dfcd164b
无相关合并请求
......@@ -205,29 +205,23 @@ virStorageBackendRBDOpenIoCTX(virStorageBackendRBDStatePtr ptr,
return r;
}
static int
static void
virStorageBackendRBDCloseRADOSConn(virStorageBackendRBDStatePtr ptr)
{
int ret = 0;
if (ptr->ioctx != NULL) {
VIR_DEBUG("Closing RADOS IoCTX");
rados_ioctx_destroy(ptr->ioctx);
ret = -1;
}
ptr->ioctx = NULL;
if (ptr->cluster != NULL) {
VIR_DEBUG("Closing RADOS connection");
rados_shutdown(ptr->cluster);
ret = -2;
}
ptr->cluster = NULL;
time_t runtime = time(0) - ptr->starttime;
VIR_DEBUG("RADOS connection existed for %ld seconds", runtime);
return ret;
VIR_DEBUG("RADOS connection existed for %ld seconds",
time(0) - ptr->starttime);
}
static int
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部