From nobody Fri May 3 03:40:42 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 1542219429717726.3754933542419; Wed, 14 Nov 2018 10:17:09 -0800 (PST) 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 CCB32811DB; Wed, 14 Nov 2018 18:17:05 +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 C7E041019637; Wed, 14 Nov 2018 18:17:04 +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 6C5AA4BB79; Wed, 14 Nov 2018 18:17:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAEHnDNa017247 for ; Wed, 14 Nov 2018 12:49:13 -0500 Received: by smtp.corp.redhat.com (Postfix) id 606D55D744; Wed, 14 Nov 2018 17:49:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx14.extmail.prod.ext.phx2.redhat.com [10.5.110.43]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 571875DA2A for ; Wed, 14 Nov 2018 17:49:11 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (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 2ADD3308FB93 for ; Wed, 14 Nov 2018 17:49:10 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id y16so27308991qki.7 for ; Wed, 14 Nov 2018 09:49:10 -0800 (PST) Received: from localhost.localdomain ([2804:431:b704:5cdb:adf7:2bc7:ec25:714]) by smtp.gmail.com with ESMTPSA id h35sm2845510qth.59.2018.11.14.09.49.07 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Nov 2018 09:49:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mrscxJ4CreUaS/UQ+tm9GGvGPIDr396JElFDLSqzXYA=; b=uOv/g7Q99uxNZNmAgFxGQK7u9Y7Ko5z5vl+zTzhe1ijAEfWTkRABka3+VWgAtz12sC Cgr/muaOhsLDMfQYsxcY72BCWXzil1QFuGUN9xYm1j9ZR9IZyAErnBqDjrHwpVxgB5T3 3OIpLubn1RQ2zcV74jWsY6iJt7N00+mngDtzItq00qkXa6WLMo7u5Tf6/mECF3ebGKw2 XLqUAYx+CHjo+IIJdyfVdpUN2rsULXeQQQHV5tTiEzGRuc0u6sm5WEa3i4/S3CsmkJBI NiAkxEUTnOvlvGJKeAbRuFuzw6fHyC4mF+8YJZmq1Un2qSmTN+yV321pQ3+sKXapx1Ln ioNQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=mrscxJ4CreUaS/UQ+tm9GGvGPIDr396JElFDLSqzXYA=; b=qpyZpc9x7BjpVoqa0PrMe5wGZy5DDuqjNuiHlZCpH7oJ9wgcna8xQJCmOnzEGKExsn 1zHObQy2SPu35iYiQFkuQf5/UDL34ksh5/AfiE/ImGMrgmit363n30ICsniqppE8BzeL LwDU+uQLvSDY0b6ml7tPhEqESGWtcNanNXMdeLVLV6J2Iga/NqWSDbRKvEk0GzOB1PeT 7jI1+x+pbzofZZGlSRB9jqbGVJQ8hVgCSG+BUfTpo6XMp80nQEx5tpXJK9Aw3yM1zFrX Ke0d+6daRizhm248dw3LVw+4bA6pL067Vso0/k/oPUCPZNuUuw4rHgfWH2qwh9+/arjq rWQQ== X-Gm-Message-State: AGRZ1gJvkY2wz1zhpgCNIQ7rgJ4pHxEKGfZHBIqOFHoNxStv8NE8oXaj +RzAh86h5SIn0ySoLjqXQdTVl0IRBJM= X-Google-Smtp-Source: AJdET5dRoC+taGrhe4HVQ5KfXwA+7lVPK1Fch98lfXCskPQA6jCLvJLR1BK84Of5vSdhas1rG+zb9Q== X-Received: by 2002:ac8:5344:: with SMTP id d4mr2713592qto.372.1542217748900; Wed, 14 Nov 2018 09:49:08 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Wed, 14 Nov 2018 15:49:00 -0200 Message-Id: <20181114174900.20656-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 14 Nov 2018 17:49:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Wed, 14 Nov 2018 17:49:10 +0000 (UTC) for IP:'209.85.222.195' DOMAIN:'mail-qk1-f195.google.com' HELO:'mail-qk1-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.222.195 mail-qk1-f195.google.com 209.85.222.195 mail-qk1-f195.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.43 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] rpc: Remove duplicate check from filter function return. 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: , 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.27]); Wed, 14 Nov 2018 18:17:07 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This is a simple removal of a duplicated check of the return of the filter function. There is a nested conditional checking exactly the same thing. Signed-off-by: Julio Faracco Reviewed-by: John Ferlan --- src/rpc/virnetserverclient.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/rpc/virnetserverclient.c b/src/rpc/virnetserverclient.c index 97cf126f56..778cd1afc0 100644 --- a/src/rpc/virnetserverclient.c +++ b/src/rpc/virnetserverclient.c @@ -1288,8 +1288,7 @@ static virNetMessagePtr virNetServerClientDispatchRea= d(virNetServerClientPtr cli if (ret < 0) { virNetMessageFree(msg); msg =3D NULL; - if (ret < 0) - client->wantClose =3D true; + client->wantClose =3D true; break; } if (ret > 0) { --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list