From nobody Thu Dec 18 13:59:50 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1743773392; cv=none; d=zohomail.com; s=zohoarc; b=mPZqDD7aBvvRnG+Rj6zLa/pNhQhLYMzUbXm32Kw4kAk0ohHPTx6GtKemGbnOlfwF0e3s5+RNBhg3FTLkCRSmab/mQ8mB8WBc/ysy4PzlMtA0skhlHTFMFnBqXuulfq+9REQBbehIQThBNqcUIulebnB4sYOlt2KAtV8Ttr9+6k4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1743773392; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=aP2HjJgnuQ2I0m3t55/g8g0uctS6fDluirnJRZ+gJgY=; b=m8thSrZdul651eCQiUJF9QfHwx54LOxq6QvkHHtWU0nJiAFSq2oESUD3dgJZl4H253opmWsa2J1//RWuyWW/erjjWB1P1eeze264FmuLHnNWAldy7M4nAHKKaP7aPs7Gx/FaudQ4+zZ5vs/iSObA6MtQXhqJOE+rCmV545GqVYk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1743773392939521.591873064804; Fri, 4 Apr 2025 06:29:52 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5D37F1510; Fri, 4 Apr 2025 09:29:52 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id B89C214E0; Fri, 4 Apr 2025 09:28:17 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 482A511AA; Fri, 4 Apr 2025 09:28:10 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E1E80B90 for ; Fri, 4 Apr 2025 09:28:09 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-601-eF3jNFhEPLq6GkPKA6FJPQ-1; Fri, 04 Apr 2025 09:28:07 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1DFED1956089 for ; Fri, 4 Apr 2025 13:28:07 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.3.236]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5D99B1955BC2 for ; Fri, 4 Apr 2025 13:28:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1743773289; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dnab5u4uQNM2hco0Cohvb907j3JiufjDiXpCUlL7iD4=; b=Id9/fZP2KHXcafJLMdvd+yOmwby+FUHoZRYsTetwkGfjiPiG3NUvLtZMCT9J3anMpFsawU FFQ6X1pM0vS6H/bN26aUmFdWnNEFZky9YcPBu8Z+xvgFJu6NUTPEwDagqGLr0fnWuH8q5D H4XV6n2OPMmfR39UHTHanRJc7PKniS8= X-MC-Unique: eF3jNFhEPLq6GkPKA6FJPQ-1 X-Mimecast-MFC-AGG-ID: eF3jNFhEPLq6GkPKA6FJPQ_1743773287 To: devel@lists.libvirt.org Subject: [PATCH 3/8] doRemoteOpen: Drop needless typecast of @transport Date: Fri, 4 Apr 2025 15:27:55 +0200 Message-ID: <365175577fda810d9efafd4a2cb076cee17b5ae4.1743772965.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: LOIqkcxGKk8VAn0QlQACqrAo1fp6qNQFVZlb780445Y_1743773287 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: JBUNVM5TOFPUPMUZ7NYO7OWOQ23SY44I X-Message-ID-Hash: JBUNVM5TOFPUPMUZ7NYO7OWOQ23SY44I X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1743773394168019000 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The @transport variable is already pass into the function with proper type. There's no need to typecast it to its very same type inside the function. Signed-off-by: Michal Privoznik --- src/remote/remote_driver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 3ecef7d73f..2690c05267 100644 --- a/src/remote/remote_driver.c +++ b/src/remote/remote_driver.c @@ -1063,7 +1063,7 @@ doRemoteOpen(virConnectPtr conn, =20 VIR_DEBUG("Connecting with transport %d", transport); =20 - switch ((remoteDriverTransport)transport) { + switch (transport) { case REMOTE_DRIVER_TRANSPORT_UNIX: case REMOTE_DRIVER_TRANSPORT_SSH: case REMOTE_DRIVER_TRANSPORT_LIBSSH: @@ -1088,7 +1088,7 @@ doRemoteOpen(virConnectPtr conn, VIR_DEBUG("Chosen UNIX socket %s", NULLSTR(sockname)); =20 /* Connect to the remote service. */ - switch ((remoteDriverTransport)transport) { + switch (transport) { case REMOTE_DRIVER_TRANSPORT_TLS: if (conf && !tls_priority && virConfGetValueString(conf, "tls_priority", &tls_priority) < 0) --=20 2.49.0