From nobody Sun Feb 8 01:31:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1578335825; cv=none; d=zohomail.com; s=zohoarc; b=aiY3q3ssl2+FbanEKiZ7ih2170UVcDIBuyOqCEORMp2V5hQZFkoGy1asY7iOtouJHj8CRB7JGyjP+cVbO5LNC/Eu5sX9Ks8+gFZrgCkSUYflyGHi0RkgmQiPUtSqWeMhNUD90jbgtmB1H6KYUtBD1bzNpVI2Ah4MhBk1kEyIhLY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1578335825; h=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=2sphsqeXWmt2nxo4pNzgWsK8+C0EHag/7k5lhcriuzg=; b=GdbRczI5CA388p/2JbJQ8s7IrAm5yb/bWHDrEtUUY2icQBns0NQQK5NZJ9WKrbust6xie4C2VI1R5gKpY2v6XXXfWu814/ZnVoxQf7BTNMq5d8BlcbA57oAja2Px8YTfqEmfE5OTJdy/vX1cxkPs1vSYU7oTno/ghx7A1fcUtpM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1578335825878610.9250347269784; Mon, 6 Jan 2020 10:37:05 -0800 (PST) Received: from localhost ([::1]:57844 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioXFQ-0007xF-CT for importer@patchew.org; Mon, 06 Jan 2020 13:37:04 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:45265) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioX3z-0001rK-Cu for qemu-devel@nongnu.org; Mon, 06 Jan 2020 13:25:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ioX3y-00041B-AV for qemu-devel@nongnu.org; Mon, 06 Jan 2020 13:25:15 -0500 Received: from mail-qv1-xf42.google.com ([2607:f8b0:4864:20::f42]:42440) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ioX3y-00040c-6Y; Mon, 06 Jan 2020 13:25:14 -0500 Received: by mail-qv1-xf42.google.com with SMTP id dc14so19417067qvb.9; Mon, 06 Jan 2020 10:25:14 -0800 (PST) Received: from rekt.ibmuc.com ([2804:431:c7c6:655b:9e1c:e865:3705:e1df]) by smtp.gmail.com with ESMTPSA id b81sm21026522qkc.135.2020.01.06.10.25.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2020 10:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2sphsqeXWmt2nxo4pNzgWsK8+C0EHag/7k5lhcriuzg=; b=Av4AJcvtOUy0CPFhaBCz5ZiTaJBTugY4UUMcxbFchMXiPFODV4/+bNN9oek01Hr/mm a+/YWlQVlxaYId52fmeEyF/wjVdQuaEwy99GiNaewgcGiIa3Nv3loeoxiCUZ2s6MKPrT BiLcFeXvdMBLWJdGlch/A64fEP1Ukve/Pdv3iu8pS0KKCP7j/LoySaaEWLYU4tmUUUr9 3ffW3i+21mwvqfyC5jabllUT9zp/qIx3GWzKRIAhyNmhkILZBp0eg4nNBWfyHSL9XG3Z gvCPOWw/UbeyXTMnxAR9eNtVIIZ5OnEVgjg5cPpspNheg3OYOPNdwvH2K+V8ilyvTxEg /UMA== 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=2sphsqeXWmt2nxo4pNzgWsK8+C0EHag/7k5lhcriuzg=; b=SnwP7x/kyX8olKKXOUPJ7WLKZEzrSqSINF0BtW1ZT2G5hrc4pvpQV95edIVSBxfiwx Mq5E0azDCotqmm7WaLS2B7hE7iHgp4rd4WTGIAUmyM2DpZ9OFn5qzoMpe//wHevrcSfk diY9cVEsRoJIih5Kbdc4eZTR8VgtfzBsDBxat9idszbsqXokLS48o7Y8ZzVzDJ1nBG/z EI1oejSGXctA/Hx8E3v74IGfhpkFdxhAYqiPin+3kbLTgNT7VxbxCMt8GJdFwyqTjLcX w2s3uND5RxmYM6pMkh6mqWJVQQbAwMy3A8fJZvqmNKVfL3PW3FToyVfVhcmczhVGjHey tw5g== X-Gm-Message-State: APjAAAW7CdJD1EXF7wOoCGjAxr7/dxWmpzOT5Cfv2kBDiaeHKnN05NkO 8vJetJ1FJTp0rWuXVWN1bYG7juu0 X-Google-Smtp-Source: APXvYqxbEPLQoXbbC7smuVlCk3eHBMp7zY0FXnL4X+Wuae99p+OfYQTKcEB/oFd0Z+KlU3OEqpDJrw== X-Received: by 2002:ad4:4e68:: with SMTP id ec8mr80760104qvb.203.1578335113486; Mon, 06 Jan 2020 10:25:13 -0800 (PST) From: Daniel Henrique Barboza To: qemu-devel@nongnu.org Subject: [PATCH v1 12/59] virtfs-proxy-helper.c: remove 'err_out' label in setugid() Date: Mon, 6 Jan 2020 15:23:38 -0300 Message-Id: <20200106182425.20312-13-danielhb413@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200106182425.20312-1-danielhb413@gmail.com> References: <20200106182425.20312-1-danielhb413@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::f42 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-trivial@nongnu.org, Daniel Henrique Barboza , Greg Kurz Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @gmail.com) Content-Type: text/plain; charset="utf-8" 'err_out' can be removed and be replaced by 'return -errno' in its only instance in the function. CC: Greg Kurz Signed-off-by: Daniel Henrique Barboza Acked-by: Greg Kurz --- fsdev/virtfs-proxy-helper.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fsdev/virtfs-proxy-helper.c b/fsdev/virtfs-proxy-helper.c index 0d4de49dcf..aa1ab2590d 100644 --- a/fsdev/virtfs-proxy-helper.c +++ b/fsdev/virtfs-proxy-helper.c @@ -287,8 +287,7 @@ static int setugid(int uid, int gid, int *suid, int *sg= id) *sgid =3D getegid(); =20 if (setresgid(-1, gid, *sgid) =3D=3D -1) { - retval =3D -errno; - goto err_out; + return -errno; } =20 if (setresuid(-1, uid, *suid) =3D=3D -1) { @@ -322,7 +321,6 @@ err_sgid: if (setresgid(-1, *sgid, *sgid) =3D=3D -1) { abort(); } -err_out: return retval; } =20 --=20 2.24.1