From nobody Sun Feb 8 19:59:57 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1578347932; cv=none; d=zohomail.com; s=zohoarc; b=km5YbJDf8+q/fqUHhZy9hSOl+APLv3DE65ULLZPnE84IlavH/J/pC/4/yqHHIT+AvvUYdkOVEI1Obr34zTBsgXvuPW1fTpufaUyPocLigR+BDrlztlE+NO0W9CJqyjyLw4zThOPE6wPhv6GN/aGri2x/iK2AnDrRIVyowcnJn1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578347932; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=zoKaHkKQl6tFRgCV0bUOM/hgXTQ7/nAm3N5JTcQFb8Y=; b=nGj8LQ0btnG867qTKUeO10JVUbPD8QYrIawEHJNE1lyNrXDqyRMd3u4UL07SuiQzwMglBTyiene+Pe/r4un4J7m7ugNGAwhcBMayqe6Cwin52PyfnhNoScAhqaFXRNNsz2AaYZRwTN/Uo6j1tWax2+KFK+Z6ClZZTcnwGUgPTjw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1578347932991196.4631104466638; Mon, 6 Jan 2020 13:58:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-92-2-N1VblkOBe9Sd9aKq98Pg-1; Mon, 06 Jan 2020 16:58:49 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3ADD8107ACE5; Mon, 6 Jan 2020 21:58:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B4A81101F942; Mon, 6 Jan 2020 21:58:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 6A66181C8E; Mon, 6 Jan 2020 21:58:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 006Lwbco007404 for ; Mon, 6 Jan 2020 16:58:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 193732166B2A; Mon, 6 Jan 2020 21:58:37 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 142C82166B29 for ; Mon, 6 Jan 2020 21:58:37 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E8428101D223 for ; Mon, 6 Jan 2020 21:58:36 +0000 (UTC) Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-359-G9bBUKKYPHO0ZgJmz7xVXg-1; Mon, 06 Jan 2020 16:58:35 -0500 Received: by mail-qk1-f169.google.com with SMTP id c16so40891411qko.6 for ; Mon, 06 Jan 2020 13:58:35 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:655b:9e1c:e865:3705:e1df]) by smtp.gmail.com with ESMTPSA id x34sm23898440qtd.20.2020.01.06.13.58.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 13:58:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1578347931; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=zoKaHkKQl6tFRgCV0bUOM/hgXTQ7/nAm3N5JTcQFb8Y=; b=UPxPgnsK+uEVXRoS+ug8IblThmMm+U+KOzuTNod926FSFozKW1czH2/F4IkmkBG5L4KX7g 1WuU2CtSIt512g1HUDNQW+ZcV3ebKDQbiSH2TSIacY65wWtXgn3drLPd/A+I59fyEgZYeC UfbokVA25jrOERNwYmS8NGJ1BFM65t0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=z3SUBXfSYfZbmCKpOADRYUDZ0Rjf4hngy1Cn/NDF364=; b=IJVtBX/4K98D4YQISsrkAtmvQnd1ZZnhiClMBDSeFFfvn3EdnlMSbX0+LW5C3HvGjJ uty/gupSIYyk8R1BY14l7COreJCDDZ9tnV6fqS5EcpHEyEh1POKUkYR6fnV86UmAzUVY W3zJwvz1iIvxcFmqabBxB6T3MWzARu09gB1z3wwkC/7QrkfhLZzTuoSvTLYDKMCip3OJ 9xTP9a+dKehkCz5KYWDSFgKhA9iqc2RXxjAj/1Qwp/ZdYIq530LxKHafK7GWxoqsOV16 7z11X+fbDSwIzm5Rp08RV/3/rIhQexso/xkUGH2caAvh7VlMUv8xbbml5o8X44h7qOCk faVg== X-Gm-Message-State: APjAAAXHkYS3IJZnZ3nLF6760uUE+YmwbpMmt9OLIUCwAt/zuhEGjEVG /LZJ9j1vaaixGIe56l0GQRRuYxkC X-Google-Smtp-Source: APXvYqxABUCE7YURjLhkJxB0Nf6pRQyJbYnlmcfDS4I5dL2NqgSn5g6nFQtrgJJva9ZhFE2p9UnbGw== X-Received: by 2002:a37:66c2:: with SMTP id a185mr83428661qkc.211.1578347914602; Mon, 06 Jan 2020 13:58:34 -0800 (PST) From: Daniel Henrique Barboza To: libvir-list@redhat.com Date: Mon, 6 Jan 2020 18:57:48 -0300 Message-Id: <20200106215750.361615-25-danielhb413@gmail.com> In-Reply-To: <20200106215750.361615-1-danielhb413@gmail.com> References: <20200106215750.361615-1-danielhb413@gmail.com> MIME-Version: 1.0 X-MC-Unique: G9bBUKKYPHO0ZgJmz7xVXg-1 X-MC-Unique: 2-N1VblkOBe9Sd9aKq98Pg-1 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 006Lwbco007404 X-loop: libvir-list@redhat.com Cc: Daniel Henrique Barboza Subject: [libvirt] [PATCH v1 24/26] logging: remove unneeded labels X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Signed-off-by: Daniel Henrique Barboza --- src/logging/log_handler.c | 7 ++----- src/logging/log_manager.c | 14 ++++---------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index 29ea3011b9..030c9d66e3 100644 --- a/src/logging/log_handler.c +++ b/src/logging/log_handler.c @@ -196,10 +196,10 @@ virLogHandlerNew(bool privileged, virLogHandlerPtr handler; =20 if (virLogHandlerInitialize() < 0) - goto error; + return NULL; =20 if (!(handler =3D virObjectLockableNew(virLogHandlerClass))) - goto error; + return NULL; =20 handler->privileged =3D privileged; handler->max_size =3D max_size; @@ -208,9 +208,6 @@ virLogHandlerNew(bool privileged, handler->opaque =3D opaque; =20 return handler; - - error: - return NULL; } =20 =20 diff --git a/src/logging/log_manager.c b/src/logging/log_manager.c index 6b66218116..fd7c2922b3 100644 --- a/src/logging/log_manager.c +++ b/src/logging/log_manager.c @@ -213,7 +213,6 @@ virLogManagerDomainGetLogFilePosition(virLogManagerPtr = mgr, { struct virLogManagerProtocolDomainGetLogFilePositionArgs args; struct virLogManagerProtocolDomainGetLogFilePositionRet ret; - int rv =3D -1; =20 memset(&args, 0, sizeof(args)); memset(&ret, 0, sizeof(ret)); @@ -228,14 +227,12 @@ virLogManagerDomainGetLogFilePosition(virLogManagerPt= r mgr, 0, NULL, NULL, NULL, (xdrproc_t)xdr_virLogManagerProtocolDomain= GetLogFilePositionArgs, &args, (xdrproc_t)xdr_virLogManagerProtocolDomain= GetLogFilePositionRet, &ret) < 0) - goto cleanup; + return -1; =20 *inode =3D ret.pos.inode; *offset =3D ret.pos.offset; =20 - rv =3D 0; - cleanup: - return rv; + return 0; } =20 =20 @@ -249,7 +246,6 @@ virLogManagerDomainReadLogFile(virLogManagerPtr mgr, { struct virLogManagerProtocolDomainReadLogFileArgs args; struct virLogManagerProtocolDomainReadLogFileRet ret; - char *rv =3D NULL; =20 memset(&args, 0, sizeof(args)); memset(&ret, 0, sizeof(ret)); @@ -267,11 +263,9 @@ virLogManagerDomainReadLogFile(virLogManagerPtr mgr, 0, NULL, NULL, NULL, (xdrproc_t)xdr_virLogManagerProtocolDomain= ReadLogFileArgs, &args, (xdrproc_t)xdr_virLogManagerProtocolDomain= ReadLogFileRet, &ret) < 0) - goto cleanup; + return NULL; =20 - rv =3D ret.data; - cleanup: - return rv; + return ret.data; } =20 =20 --=20 2.24.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list