]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
don't test "res == NULL" after we've already dereferenced "res"
authorJim Meyering <meyering@redhat.com>
Wed, 6 Jan 2010 11:45:07 +0000 (12:45 +0100)
committerJim Meyering <meyering@redhat.com>
Sat, 9 Jan 2010 07:50:15 +0000 (08:50 +0100)
* src/xen/proxy_internal.c (xenProxyCommand): "res" is known to be
non-NULL at that point, so remove the "res == NULL" guard.

src/xen/proxy_internal.c

index ec4522b12e9d2b1b7548adc69ea5f47b7e655cbe..ee4678a4ff4bea2b9253f6894c757ce6a8a4f31c 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * proxy_client.c: client side of the communication with the libvirt proxy.
  *
- * Copyright (C) 2006, 2008, 2009 Red Hat, Inc.
+ * Copyright (C) 2006, 2008, 2009, 2010 Red Hat, Inc.
  *
  * See COPYING.LIB for the License of this software
  *
@@ -444,7 +444,7 @@ retry:
     /*
      * do more checks on the incoming packet.
      */
-    if ((res == NULL) || (res->version != PROXY_PROTO_VERSION) ||
+    if ((res->version != PROXY_PROTO_VERSION) ||
         (res->len < sizeof(virProxyPacket))) {
         virProxyError(conn, VIR_ERR_INTERNAL_ERROR, "%s",
                       _("Communication error with proxy: malformed packet\n"));