mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-28 11:31:16 +00:00
logging: remove unneeded labels
Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com> Reviewed-by: Erik Skultety <eskultet@redhat.com>
This commit is contained in:
parent
a3645a4747
commit
9b1007d004
@ -196,10 +196,10 @@ virLogHandlerNew(bool privileged,
|
|||||||
virLogHandlerPtr handler;
|
virLogHandlerPtr handler;
|
||||||
|
|
||||||
if (virLogHandlerInitialize() < 0)
|
if (virLogHandlerInitialize() < 0)
|
||||||
goto error;
|
return NULL;
|
||||||
|
|
||||||
if (!(handler = virObjectLockableNew(virLogHandlerClass)))
|
if (!(handler = virObjectLockableNew(virLogHandlerClass)))
|
||||||
goto error;
|
return NULL;
|
||||||
|
|
||||||
handler->privileged = privileged;
|
handler->privileged = privileged;
|
||||||
handler->max_size = max_size;
|
handler->max_size = max_size;
|
||||||
@ -208,9 +208,6 @@ virLogHandlerNew(bool privileged,
|
|||||||
handler->opaque = opaque;
|
handler->opaque = opaque;
|
||||||
|
|
||||||
return handler;
|
return handler;
|
||||||
|
|
||||||
error:
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -213,7 +213,6 @@ virLogManagerDomainGetLogFilePosition(virLogManagerPtr mgr,
|
|||||||
{
|
{
|
||||||
struct virLogManagerProtocolDomainGetLogFilePositionArgs args;
|
struct virLogManagerProtocolDomainGetLogFilePositionArgs args;
|
||||||
struct virLogManagerProtocolDomainGetLogFilePositionRet ret;
|
struct virLogManagerProtocolDomainGetLogFilePositionRet ret;
|
||||||
int rv = -1;
|
|
||||||
|
|
||||||
memset(&args, 0, sizeof(args));
|
memset(&args, 0, sizeof(args));
|
||||||
memset(&ret, 0, sizeof(ret));
|
memset(&ret, 0, sizeof(ret));
|
||||||
@ -228,14 +227,12 @@ virLogManagerDomainGetLogFilePosition(virLogManagerPtr mgr,
|
|||||||
0, NULL, NULL, NULL,
|
0, NULL, NULL, NULL,
|
||||||
(xdrproc_t)xdr_virLogManagerProtocolDomainGetLogFilePositionArgs, &args,
|
(xdrproc_t)xdr_virLogManagerProtocolDomainGetLogFilePositionArgs, &args,
|
||||||
(xdrproc_t)xdr_virLogManagerProtocolDomainGetLogFilePositionRet, &ret) < 0)
|
(xdrproc_t)xdr_virLogManagerProtocolDomainGetLogFilePositionRet, &ret) < 0)
|
||||||
goto cleanup;
|
return -1;
|
||||||
|
|
||||||
*inode = ret.pos.inode;
|
*inode = ret.pos.inode;
|
||||||
*offset = ret.pos.offset;
|
*offset = ret.pos.offset;
|
||||||
|
|
||||||
rv = 0;
|
return 0;
|
||||||
cleanup:
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -249,7 +246,6 @@ virLogManagerDomainReadLogFile(virLogManagerPtr mgr,
|
|||||||
{
|
{
|
||||||
struct virLogManagerProtocolDomainReadLogFileArgs args;
|
struct virLogManagerProtocolDomainReadLogFileArgs args;
|
||||||
struct virLogManagerProtocolDomainReadLogFileRet ret;
|
struct virLogManagerProtocolDomainReadLogFileRet ret;
|
||||||
char *rv = NULL;
|
|
||||||
|
|
||||||
memset(&args, 0, sizeof(args));
|
memset(&args, 0, sizeof(args));
|
||||||
memset(&ret, 0, sizeof(ret));
|
memset(&ret, 0, sizeof(ret));
|
||||||
@ -267,11 +263,9 @@ virLogManagerDomainReadLogFile(virLogManagerPtr mgr,
|
|||||||
0, NULL, NULL, NULL,
|
0, NULL, NULL, NULL,
|
||||||
(xdrproc_t)xdr_virLogManagerProtocolDomainReadLogFileArgs, &args,
|
(xdrproc_t)xdr_virLogManagerProtocolDomainReadLogFileArgs, &args,
|
||||||
(xdrproc_t)xdr_virLogManagerProtocolDomainReadLogFileRet, &ret) < 0)
|
(xdrproc_t)xdr_virLogManagerProtocolDomainReadLogFileRet, &ret) < 0)
|
||||||
goto cleanup;
|
return NULL;
|
||||||
|
|
||||||
rv = ret.data;
|
return ret.data;
|
||||||
cleanup:
|
|
||||||
return rv;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user