From nobody Sat May 4 23:49:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1528182482005758.9000142119496; Tue, 5 Jun 2018 00:08:02 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 22D331B3E72; Tue, 5 Jun 2018 07:08:00 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DBF4B10694D2; Tue, 5 Jun 2018 07:07:59 +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 7E0301800FC1; Tue, 5 Jun 2018 07:07:59 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w5577wp3025018 for ; Tue, 5 Jun 2018 03:07:58 -0400 Received: by smtp.corp.redhat.com (Postfix) id AD189600CC; Tue, 5 Jun 2018 07:07:58 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id A6F29600C0 for ; Tue, 5 Jun 2018 07:07:56 +0000 (UTC) Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id A910AA9378 for ; Tue, 5 Jun 2018 07:07:44 +0000 (UTC) Received: by mail-wm0-f65.google.com with SMTP id v131-v6so2884766wma.1 for ; Tue, 05 Jun 2018 00:07:44 -0700 (PDT) Received: from rst.wireless.abdn.ac.uk (oa-edu-161-167.wireless.abdn.ac.uk. [137.50.161.167]) by smtp.gmail.com with ESMTPSA id i46-v6sm41556677wra.36.2018.06.05.00.07.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 05 Jun 2018 00:07:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=ErW6tKiBL8zOWeg8u4AeCtd5mOIYoVIGFBpdeaiSrMc=; b=hHphDMGPkWV0GaN/AW0OrZPAw5yc97duvguXo6vIM6LouMlcYB000QkGUhRV9+0yTv qkLlAEWqS/H8nPGCtkk655l/UJlHcy2ONco1OYkq+E1My3AAtlLamF6UA6mgRwr2+j4x 0hTOiYjwF08bO/dJBV+QTljyDdymnLojVn+qVYrvN8iX8mYGQl/9VP0JVQ3UkMtbywm/ Z3ONx2/Y0A+Q6iLTAFM6abCeUDxXP9BfDLw+4AlqPSZZT/30bkgGYpMW1fcYLyLAMtzV cA42tZnvZzQqab7XBHeBWSJV5BAKhTAiIMHbAZV5qnFoXVfjGxLCd25HPJR32WbNsJr4 u8FA== 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; bh=ErW6tKiBL8zOWeg8u4AeCtd5mOIYoVIGFBpdeaiSrMc=; b=euoxGI4a5xVwyPPAKP6y84lsPoJNvv08myozPSJ6VJeaVM7WE2SHjNnB1bS54cuAVs 6pt5Sw9Q45S5X2iqplGHmnoOtkkT5YRgnvPf+RTQYT4PXGljtoYXxKq1Rij9/egPgymu K4M9ePXISb7mtMBcimQ1IbB9XtYNbxc02etEE+YtltGUZVBAiQgmTuXxxhUajk6oZfbN fhCYi+gL5FIY3o1J3RmqNRWPPmQyPM+jKAhwfNtLuAXpSGHp3PWndmXt4gQBUHLVxylY vBwnJnHZm5gMZi5Y5E4eKAlVOZ6Nnp+EojXi6jGUnJNGp+BIVwXiNNWH+TGi0/jRKtQH b8cw== X-Gm-Message-State: APt69E2ZlPwzUHF7sMQR2lQOy83Bh/dEU/9YXrAlMxCY4NTbWS03p2X0 w78Sk2dP8XMlDLO1018qmc6CvR1WKCg= X-Google-Smtp-Source: ADUXVKKgZKitYTMzcot9gj730UNyrGqYJPstTFSuG/2NVA773w7LhmbpETuunX84RqfcHNTEnyCltQ== X-Received: by 2002:a1c:ea9b:: with SMTP id g27-v6mr10240273wmi.21.1528182463106; Tue, 05 Jun 2018 00:07:43 -0700 (PDT) From: Radostin Stoyanov To: libvir-list@redhat.com Date: Tue, 5 Jun 2018 08:07:40 +0100 Message-Id: <20180605070740.22953-1-rstoyanov1@gmail.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 05 Jun 2018 07:07:44 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Tue, 05 Jun 2018 07:07:44 +0000 (UTC) for IP:'74.125.82.65' DOMAIN:'mail-wm0-f65.google.com' HELO:'mail-wm0-f65.google.com' FROM:'rstoyanov1@gmail.com' RCPT:'' X-RedHat-Spam-Score: 1.531 * (DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, NML_ADSP_CUSTOM_MED, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS, T_DKIM_INVALID) 74.125.82.65 mail-wm0-f65.google.com 74.125.82.65 mail-wm0-f65.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com Cc: Radostin Stoyanov Subject: [libvirt] [PATCH] virFileAccessibleAs: Remove redundant forkRet 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Tue, 05 Jun 2018 07:08:00 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" The variable forkRet is not used after commit 25f8781 https://github.com/libvirt/libvirt/commit/25f8781#diff-d2023c1ac4f688aa2021= e21cfb60d4f0L1861 Signed-off-by: Radostin Stoyanov --- src/util/virfile.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/util/virfile.c b/src/util/virfile.c index 523241f64f..a2c4cebb56 100644 --- a/src/util/virfile.c +++ b/src/util/virfile.c @@ -2117,7 +2117,6 @@ virFileAccessibleAs(const char *path, int mode, { pid_t pid =3D 0; int status, ret =3D 0; - int forkRet =3D 0; gid_t *groups; int ngroups; =20 @@ -2152,15 +2151,6 @@ virFileAccessibleAs(const char *path, int mode, return 0; } =20 - /* child. - * Return positive value here. Parent - * will change it to negative one. */ - - if (forkRet < 0) { - ret =3D errno; - goto childerror; - } - if (virSetUIDGID(uid, gid, groups, ngroups) < 0) { ret =3D errno; goto childerror; --=20 2.17.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list