From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=fail (p=quarantine dis=none) header.from=redhat.com Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by passt.top (Postfix) with ESMTPS id 05F645A0272 for ; Fri, 20 Nov 2026 02:32:59 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795138379; 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=PMYfRWxBJwHBJ1z0VixKyNMvvotuIihjv/L6wI+yIX8=; b=J6+xfPF/tq2VRAtYaDkZX46axLcY1JkCBpY+xdlUOgxv65z3vpRZb8lP05H/ozqKaQc/4o avN7FPJWVM/+TFY5kfr3uwHnwBJaEJWtR1J0jNIB4HJ82e9liRJeBcJA1E43+7Qak9RPL4 xmt+DwXa6YaKfKDOZXI2mR/NsBSlum8= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-502-35wa2ldVMFC9xy661W8I8Q-1; Fri, 20 Nov 2026 01:32:55 +0000 X-MC-Unique: 35wa2ldVMFC9xy661W8I8Q-1 X-Mimecast-MFC-AGG-ID: 35wa2ldVMFC9xy661W8I8Q_1795138374 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (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-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id F3F62180135A; Fri, 20 Nov 2026 01:32:53 +0000 (UTC) Received: from jmaloy-thinkpadp16vgen1.redhat.corp (headnet04.pony-001.prod.iad2.dc.redhat.com [10.2.32.116]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B94721800543; Fri, 20 Nov 2026 01:32:52 +0000 (UTC) From: Jon Maloy To: sbrivio@redhat.com, david@gibson.dropbear.id.au, jmaloy@redhat.com, passt-dev@passt.top Subject: [PATCH 3/3] passt-repair: Drop redundant parentheses around stat() calls Date: Thu, 19 Nov 2026 20:32:48 -0500 Message-ID: <20261120013248.1472649-4-jmaloy@redhat.com> In-Reply-To: <20261120013248.1472649-1-jmaloy@redhat.com> References: <20261120013248.1472649-1-jmaloy@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: WK6D1orqIfUkvQnh2tjhCxbC8e7yF5KpY45CvB9JbVo_1795138374 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit content-type: text/plain; charset="US-ASCII"; x-default=true Message-ID-Hash: IIQ3ISF6WW5CIKFHW2SXMFYQG4LKRCZU X-Message-ID-Hash: IIQ3ISF6WW5CIKFHW2SXMFYQG4LKRCZU X-MailFrom: jmaloy@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: clang-tidy 23.1.5 reports: passt-repair.c:122:6: error: redundant parentheses around expression [readability-redundant-parentheses,-warnings-as-errors] 122 | if ((stat(a->sun_path, sb))) { and the same for the stat() call in main(). There's no assignment in those conditions, so the extra parentheses are pointless. Drop them. Signed-off-by: Jon Maloy --- passt-repair.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/passt-repair.c b/passt-repair.c index 3958c3af..2a147432 100644 --- a/passt-repair.c +++ b/passt-repair.c @@ -119,7 +119,7 @@ static int wait_for_socket(struct sockaddr_un *a, const char *dir, ret = snprintf(a->sun_path, sizeof(a->sun_path), "%s/%s", dir, ev->name); - if ((stat(a->sun_path, sb))) { + if (stat(a->sun_path, sb)) { FPRINTF(stderr, "Can't stat() %s: %i\n", a->sun_path, errno); _exit(1); } @@ -186,7 +186,7 @@ int main(int argc, char **argv) _exit(1); } - if ((stat(argv[1], &sb))) { + if (stat(argv[1], &sb)) { FPRINTF(stderr, "Can't stat() %s: %i\n", argv[1], errno); _exit(1); } -- 2.56.1