]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
xenXMDomainConfigParse: avoid dead store
authorJim Meyering <meyering@redhat.com>
Fri, 5 Mar 2010 15:15:09 +0000 (16:15 +0100)
committerJim Meyering <meyering@redhat.com>
Fri, 5 Mar 2010 22:24:42 +0000 (23:24 +0100)
* src/xen/xm_internal.c (xenXMDomainConfigParse): Avoid dead store
to local, "data".  Remove declaration, too.

src/xen/xm_internal.c

index 014cbfc16f184ae8b19396d111e7fea0177a7ac1..3710dcbf22eef736353f153f9f4e6c526609e7c3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * xm_internal.h: helper routines for dealing with inactive domains
  *
- * Copyright (C) 2006-2007, 2009 Red Hat
+ * Copyright (C) 2006-2007, 2009, 2010 Red Hat
  * Copyright (C) 2006 Daniel P. Berrange
  *
  * This library is free software; you can redistribute it and/or
@@ -1367,7 +1367,6 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
                 graphics->type = VIR_DOMAIN_GRAPHICS_TYPE_VNC;
 
             while (key) {
-                char *data;
                 char *nextkey = strchr(key, ',');
                 char *end = nextkey;
                 if (nextkey) {
@@ -1375,7 +1374,7 @@ xenXMDomainConfigParse(virConnectPtr conn, virConfPtr conf) {
                     nextkey++;
                 }
 
-                if (!(data = strchr(key, '=')))
+                if (!strchr(key, '='))
                     break;
 
                 if (graphics->type == VIR_DOMAIN_GRAPHICS_TYPE_VNC) {