1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-22 17:34:18 +03: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:
Daniel Henrique Barboza 2020-01-06 18:57:48 -03:00 committed by Erik Skultety
parent a3645a4747
commit 9b1007d004
2 changed files with 6 additions and 15 deletions

View File

@ -196,10 +196,10 @@ virLogHandlerNew(bool privileged,
virLogHandlerPtr handler;
if (virLogHandlerInitialize() < 0)
goto error;
return NULL;
if (!(handler = virObjectLockableNew(virLogHandlerClass)))
goto error;
return NULL;
handler->privileged = privileged;
handler->max_size = max_size;
@ -208,9 +208,6 @@ virLogHandlerNew(bool privileged,
handler->opaque = opaque;
return handler;
error:
return NULL;
}

View File

@ -213,7 +213,6 @@ virLogManagerDomainGetLogFilePosition(virLogManagerPtr mgr,
{
struct virLogManagerProtocolDomainGetLogFilePositionArgs args;
struct virLogManagerProtocolDomainGetLogFilePositionRet ret;
int rv = -1;
memset(&args, 0, sizeof(args));
memset(&ret, 0, sizeof(ret));
@ -228,14 +227,12 @@ virLogManagerDomainGetLogFilePosition(virLogManagerPtr mgr,
0, NULL, NULL, NULL,
(xdrproc_t)xdr_virLogManagerProtocolDomainGetLogFilePositionArgs, &args,
(xdrproc_t)xdr_virLogManagerProtocolDomainGetLogFilePositionRet, &ret) < 0)
goto cleanup;
return -1;
*inode = ret.pos.inode;
*offset = ret.pos.offset;
rv = 0;
cleanup:
return rv;
return 0;
}
@ -249,7 +246,6 @@ virLogManagerDomainReadLogFile(virLogManagerPtr mgr,
{
struct virLogManagerProtocolDomainReadLogFileArgs args;
struct virLogManagerProtocolDomainReadLogFileRet ret;
char *rv = NULL;
memset(&args, 0, sizeof(args));
memset(&ret, 0, sizeof(ret));
@ -267,11 +263,9 @@ virLogManagerDomainReadLogFile(virLogManagerPtr mgr,
0, NULL, NULL, NULL,
(xdrproc_t)xdr_virLogManagerProtocolDomainReadLogFileArgs, &args,
(xdrproc_t)xdr_virLogManagerProtocolDomainReadLogFileRet, &ret) < 0)
goto cleanup;
return NULL;
rv = ret.data;
cleanup:
return rv;
return ret.data;
}