提交 1f5e2925 编写于 作者: J Jim Meyering

remote_internal.c: appease clang

* src/remote_internal.c (remoteNetworkOpen): Mark "conn" parameter
as non-NULL.  Remove now-unnecessary "conn == NULL" test.
(remoteDevMonOpen): Likewise.
(remoteSecretOpen): Likewise.
(remoteStorageOpen): Likewise.
(remoteInterfaceOpen): Likewise.
上级 45aec0ea
...@@ -3278,7 +3278,7 @@ done: ...@@ -3278,7 +3278,7 @@ done:
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
static virDrvOpenStatus static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
remoteNetworkOpen (virConnectPtr conn, remoteNetworkOpen (virConnectPtr conn,
virConnectAuthPtr auth, virConnectAuthPtr auth,
int flags) int flags)
...@@ -3286,8 +3286,7 @@ remoteNetworkOpen (virConnectPtr conn, ...@@ -3286,8 +3286,7 @@ remoteNetworkOpen (virConnectPtr conn,
if (inside_daemon) if (inside_daemon)
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
if (conn && if (conn->driver &&
conn->driver &&
STREQ (conn->driver->name, "remote")) { STREQ (conn->driver->name, "remote")) {
struct private_data *priv; struct private_data *priv;
...@@ -3768,16 +3767,15 @@ done: ...@@ -3768,16 +3767,15 @@ done:
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
static virDrvOpenStatus static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
remoteInterfaceOpen (virConnectPtr conn, remoteInterfaceOpen (virConnectPtr conn,
virConnectAuthPtr auth, virConnectAuthPtr auth,
int flags) int flags)
{ {
if (inside_daemon) if (inside_daemon)
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
if (conn && if (conn->driver &&
conn->driver &&
STREQ (conn->driver->name, "remote")) { STREQ (conn->driver->name, "remote")) {
struct private_data *priv; struct private_data *priv;
...@@ -4159,7 +4157,7 @@ done: ...@@ -4159,7 +4157,7 @@ done:
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
static virDrvOpenStatus static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
remoteStorageOpen (virConnectPtr conn, remoteStorageOpen (virConnectPtr conn,
virConnectAuthPtr auth, virConnectAuthPtr auth,
int flags) int flags)
...@@ -4167,8 +4165,7 @@ remoteStorageOpen (virConnectPtr conn, ...@@ -4167,8 +4165,7 @@ remoteStorageOpen (virConnectPtr conn,
if (inside_daemon) if (inside_daemon)
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
if (conn && if (conn->driver &&
conn->driver &&
STREQ (conn->driver->name, "remote")) { STREQ (conn->driver->name, "remote")) {
struct private_data *priv = conn->privateData; struct private_data *priv = conn->privateData;
/* If we're here, the remote driver is already /* If we're here, the remote driver is already
...@@ -5127,7 +5124,7 @@ done: ...@@ -5127,7 +5124,7 @@ done:
/*----------------------------------------------------------------------*/ /*----------------------------------------------------------------------*/
static virDrvOpenStatus static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
remoteDevMonOpen(virConnectPtr conn, remoteDevMonOpen(virConnectPtr conn,
virConnectAuthPtr auth ATTRIBUTE_UNUSED, virConnectAuthPtr auth ATTRIBUTE_UNUSED,
int flags ATTRIBUTE_UNUSED) int flags ATTRIBUTE_UNUSED)
...@@ -5135,8 +5132,7 @@ remoteDevMonOpen(virConnectPtr conn, ...@@ -5135,8 +5132,7 @@ remoteDevMonOpen(virConnectPtr conn,
if (inside_daemon) if (inside_daemon)
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
if (conn && if (conn->driver &&
conn->driver &&
STREQ (conn->driver->name, "remote")) { STREQ (conn->driver->name, "remote")) {
struct private_data *priv = conn->privateData; struct private_data *priv = conn->privateData;
/* If we're here, the remote driver is already /* If we're here, the remote driver is already
...@@ -6342,7 +6338,7 @@ done: ...@@ -6342,7 +6338,7 @@ done:
return rv; return rv;
} }
static virDrvOpenStatus static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
remoteSecretOpen (virConnectPtr conn, remoteSecretOpen (virConnectPtr conn,
virConnectAuthPtr auth, virConnectAuthPtr auth,
int flags) int flags)
...@@ -6350,8 +6346,7 @@ remoteSecretOpen (virConnectPtr conn, ...@@ -6350,8 +6346,7 @@ remoteSecretOpen (virConnectPtr conn,
if (inside_daemon) if (inside_daemon)
return VIR_DRV_OPEN_DECLINED; return VIR_DRV_OPEN_DECLINED;
if (conn && if (conn->driver &&
conn->driver &&
STREQ (conn->driver->name, "remote")) { STREQ (conn->driver->name, "remote")) {
struct private_data *priv; struct private_data *priv;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册