]> xenbits.xensource.com Git - libvirt.git/commitdiff
remote_internal.c: appease clang
authorJim Meyering <meyering@redhat.com>
Wed, 2 Sep 2009 10:22:14 +0000 (12:22 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 3 Sep 2009 16:04:23 +0000 (18:04 +0200)
* 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.

src/remote_internal.c

index ea50c113a4157d898bafc1c70ade020bd9a44a52..c1db27c2d87a14d6b1376c8446b400e886a177ac 100644 (file)
@@ -3278,7 +3278,7 @@ done:
 
 /*----------------------------------------------------------------------*/
 
-static virDrvOpenStatus
+static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
 remoteNetworkOpen (virConnectPtr conn,
                    virConnectAuthPtr auth,
                    int flags)
@@ -3286,8 +3286,7 @@ remoteNetworkOpen (virConnectPtr conn,
     if (inside_daemon)
         return VIR_DRV_OPEN_DECLINED;
 
-    if (conn &&
-        conn->driver &&
+    if (conn->driver &&
         STREQ (conn->driver->name, "remote")) {
         struct private_data *priv;
 
@@ -3768,16 +3767,15 @@ done:
 
 /*----------------------------------------------------------------------*/
 
-static virDrvOpenStatus
+static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
 remoteInterfaceOpen (virConnectPtr conn,
-                   virConnectAuthPtr auth,
-                   int flags)
+                     virConnectAuthPtr auth,
+                     int flags)
 {
     if (inside_daemon)
         return VIR_DRV_OPEN_DECLINED;
 
-    if (conn &&
-        conn->driver &&
+    if (conn->driver &&
         STREQ (conn->driver->name, "remote")) {
         struct private_data *priv;
 
@@ -4159,7 +4157,7 @@ done:
 
 /*----------------------------------------------------------------------*/
 
-static virDrvOpenStatus
+static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
 remoteStorageOpen (virConnectPtr conn,
                    virConnectAuthPtr auth,
                    int flags)
@@ -4167,8 +4165,7 @@ remoteStorageOpen (virConnectPtr conn,
     if (inside_daemon)
         return VIR_DRV_OPEN_DECLINED;
 
-    if (conn &&
-        conn->driver &&
+    if (conn->driver &&
         STREQ (conn->driver->name, "remote")) {
         struct private_data *priv = conn->privateData;
         /* If we're here, the remote driver is already
@@ -5127,7 +5124,7 @@ done:
 
 /*----------------------------------------------------------------------*/
 
-static virDrvOpenStatus
+static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
 remoteDevMonOpen(virConnectPtr conn,
                  virConnectAuthPtr auth ATTRIBUTE_UNUSED,
                  int flags ATTRIBUTE_UNUSED)
@@ -5135,8 +5132,7 @@ remoteDevMonOpen(virConnectPtr conn,
     if (inside_daemon)
         return VIR_DRV_OPEN_DECLINED;
 
-    if (conn &&
-        conn->driver &&
+    if (conn->driver &&
         STREQ (conn->driver->name, "remote")) {
         struct private_data *priv = conn->privateData;
         /* If we're here, the remote driver is already
@@ -6342,7 +6338,7 @@ done:
     return rv;
 }
 
-static virDrvOpenStatus
+static virDrvOpenStatus ATTRIBUTE_NONNULL (1)
 remoteSecretOpen (virConnectPtr conn,
                   virConnectAuthPtr auth,
                   int flags)
@@ -6350,8 +6346,7 @@ remoteSecretOpen (virConnectPtr conn,
     if (inside_daemon)
         return VIR_DRV_OPEN_DECLINED;
 
-    if (conn &&
-        conn->driver &&
+    if (conn->driver &&
         STREQ (conn->driver->name, "remote")) {
         struct private_data *priv;