提交 339cc9d9 编写于 作者: J Jim Meyering

build: avoid format warnings

* src/proxy_internal.c (xenProxyCommand): Mark a diagnostic.
* src/xen_unified.c (xenUnifiedOpen, xenUnifiedAddDomainInfo):
Fix unmarked diagnostics by removing the diagnostic altogether:
replace each xenUnifiedError(...,VIR_ERR_NO_MEMORY call with a
call to virReportOOMError.
上级 69d947eb
Mon Jan 26 20:40:35 +0100 2009 Jim Meyering <meyering@redhat.com>
build: avoid format warnings
* src/proxy_internal.c (xenProxyCommand): Mark a diagnostic.
* src/xen_unified.c (xenUnifiedOpen, xenUnifiedAddDomainInfo):
Fix unmarked diagnostics by removing the diagnostic altogether:
replace each xenUnifiedError(...,VIR_ERR_NO_MEMORY call with a
call to virReportOOMError.
Mon Jan 26 14:44:22 +0100 2009 Jim Meyering <meyering@redhat.com>
* src/virterror.c (virErrorMsg): Correct indentation.
......
/*
* proxy_client.c: client side of the communication with the libvirt proxy.
*
* Copyright (C) 2006, 2008 Red Hat, Inc.
* Copyright (C) 2006, 2008, 2009 Red Hat, Inc.
*
* See COPYING.LIB for the License of this software
*
......@@ -455,7 +455,7 @@ retry:
*/
if ((res == NULL) || (res->version != PROXY_PROTO_VERSION) ||
(res->len < sizeof(virProxyPacket))) {
virProxyError(conn, VIR_ERR_INTERNAL_ERROR,
virProxyError(conn, VIR_ERR_INTERNAL_ERROR, "%s",
_("Communication error with proxy: malformed packet\n"));
goto error;
}
......@@ -1058,5 +1058,3 @@ xenProxyDomainGetOSType(virDomainPtr domain)
return(ostype);
}
......@@ -236,7 +236,7 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
conn->uri = xmlParseURI("xen:///");
if (!conn->uri) {
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, NULL);
virReportOOMError (NULL);
return VIR_DRV_OPEN_ERROR;
}
}
......@@ -261,19 +261,19 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)
/* Allocate per-connection private data. */
if (VIR_ALLOC(priv) < 0) {
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating private data"));
virReportOOMError (NULL);
return VIR_DRV_OPEN_ERROR;
}
if (virMutexInit(&priv->lock) < 0) {
xenUnifiedError (NULL, VIR_ERR_INTERNAL_ERROR,
_("cannot initialise mutex"));
"%s", _("cannot initialise mutex"));
VIR_FREE(priv);
return VIR_DRV_OPEN_ERROR;
}
/* Allocate callback list */
if (VIR_ALLOC(cbList) < 0) {
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating callback list"));
virReportOOMError (NULL);
virMutexDestroy(&priv->lock);
VIR_FREE(priv);
return VIR_DRV_OPEN_ERROR;
......@@ -1564,7 +1564,7 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
list->count++;
return 0;
memory_error:
xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating domain info"));
virReportOOMError (NULL);
if (info)
VIR_FREE(info->name);
VIR_FREE(info);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册