-Wed Jul 18 13:01:38 CEST 2008 Jim Meyering <meyering@redhat.com>
+Sat Jul 19 09:41:53 CEST 2008 Jim Meyering <meyering@redhat.com>
+
+ remove unnecessary "V = NULL;" stmts after VIR_FREE(V)
+ * src/domain_conf.c (virDomainChrDefParseXML)
+ (virDomainNetDefParseXML): Likewise.
+ * src/iptables.c (iptRuleFree): Likewise.
+ * src/storage_backend.c (virStorageBackendRunProgRegex): Likewise.
+ * src/test.c (testOpenFromFile): Likewise.
+ * src/xmlrpc.c (xmlRpcCallRaw): Likewise.
+
+Fri Jul 18 13:01:38 CEST 2008 Jim Meyering <meyering@redhat.com>
enable format-safety checks for virDomainReportError
* src/domain_conf.c (virDomainReportError): Declare using
if (STRPREFIX((const char*)ifname, "vnet")) {
/* An auto-generated target name, blank it out */
VIR_FREE(ifname);
- ifname = NULL;
}
} else if ((script == NULL) &&
(def->type == VIR_DOMAIN_NET_TYPE_ETHERNET) &&
bindService = virXMLPropString(cur, "service");
}
- if (def->type == VIR_DOMAIN_CHR_TYPE_UDP) {
+ if (def->type == VIR_DOMAIN_CHR_TYPE_UDP)
VIR_FREE(mode);
- mode = NULL;
- }
}
} else if (xmlStrEqual(cur->name, BAD_CAST "protocol")) {
if (protocol == NULL)
iptRuleFree(iptRule *rule)
{
VIR_FREE(rule->rule);
- rule->rule = NULL;
if (rule->argv) {
int i = 0;
while (rule->argv[i])
VIR_FREE(rule->argv[i++]);
VIR_FREE(rule->argv);
- rule->argv = NULL;
}
}
goto cleanup;
/* Release matches & restart to matching the first regex */
- for (j = 0 ; j < totgroups ; j++) {
+ for (j = 0 ; j < totgroups ; j++)
VIR_FREE(groups[j]);
- groups[j] = NULL;
- }
maxReg = 0;
ngroup = 0;
}
dom->def->id = privconn->nextDomID++;
dom->persistent = 1;
}
- if (domains != NULL) {
+ if (domains != NULL)
VIR_FREE(domains);
- domains = NULL;
- }
ret = virXPathNodeSet("/node/network", ctxt, &networks);
if (ret < 0) {
net->persistent = 1;
}
- if (networks != NULL) {
+ if (networks != NULL)
VIR_FREE(networks);
- networks = NULL;
- }
xmlXPathFreeContext(ctxt);
xmlFreeDoc(xml);
if (ret != len) {
errno = EINVAL;
VIR_FREE(response);
- response = NULL;
xmlRpcError(VIR_ERR_POST_FAILED, _("read response"), 0);
}