From patchwork Thu Mar 17 12:18:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Baligh Gasmi gasmibal@gmail.com" X-Patchwork-Id: 1606542 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=f9k9lSL+; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UZMpdJst; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KK5sW6FxTz9s5V for ; Thu, 17 Mar 2022 23:23:43 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=i9QEhfNlf8ycmZNl9Mlwr+NPR9E7XeIFuegtdT3xX0M=; b=f9k9lSL+ov0IFh pmQVXPCvfee6s3r5Henymrfx+K+n/kKT3FI4QCcBLNnnJ4+Ck4IF9tZ9ik9GHezuTniTMJymmPlR3 w+rmQTLS1t2FzczdXBNCRAqqqsycGX5ehcGf/nkh1Bbi79/UPD5wrsyk1gw6zftGguL7DMr9IWLGB VdCvHRCJCWsLCnMczKf0UfJJOS2WpsEXCPJYdfT2wg6iUMWW8jYqudO9Tm+MKvNdIf//Bq92RfW+P EhY43B4veBrNx+UAUcpN41D6/IL0KoBJdwfGuXGIR7PCxlKCP7+0Jag4rnNZlpxDAXQZr3LdP/4+9 vOluSQgBWKI/KKUeWgJw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUp94-00G2ey-9P; Thu, 17 Mar 2022 12:22:22 +0000 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nUp5U-00G1B8-D1 for hostap@lists.infradead.org; Thu, 17 Mar 2022 12:18:41 +0000 Received: by mail-wr1-x42d.google.com with SMTP id h23so6494716wrb.8 for ; Thu, 17 Mar 2022 05:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qxIcOeYlYuRKG7+KV66gYg5W0b9V63rsxrHfnM4Jf40=; b=UZMpdJst8Eon6ZILibFTD5zLzSF1PDSSpcbUuCvCDdfCiVkKnOkd9nFk0pyzBWMpKt FFPc+D7ol2+PRa9iRLQqrvWaJIFHizLNGzkfMwIjS0LAnTwfGoBQ9wTjd29Q++GmyzB2 iCvooxbv9TxE7CjdE6oiC/g/E7yZetw6+0KRTn5QUlXyKDXAb9STa4ClWyyvuNoeIc/Z tfyI9eRJpmdLrP3dbJO/VNiVyY+eUzq1SvAPyJiJ7esI2JxUyQfL0mLE8OtfSSWH+yo7 YkFNGD6U3wpmIVg/DCsGUGcnJZ7yJr+hhvJx1NcyWisz+4aXsTSIFI2EWYQ1qwOUXvq6 /WMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=qxIcOeYlYuRKG7+KV66gYg5W0b9V63rsxrHfnM4Jf40=; b=1rZGROCdlfSp8ZH9t4uGKQhVeQCyFdQhrVCnMUqM5eLaE6E3dPTQb4eI/5N/kHEVv+ ATnRwF9GDDsazE2BuVrEhdTZ2GyXJZEmy+qlEoWyn0zltPuVcldf4Slz8/LcLnr+11bU g/3RZBgR0XEn+zHkh/PZ1T31PVgeSQ6q7affeJzW76W+yNbOqRowpdUAP/CFKOkGPD1M wxYbOCd5iLzVfpBMrtjQ4OtmBTnFEomnVgM5vQuciMMK4CR9CsheHVUTO6S+s8FaGTc4 BLotk7Aglhh//m3BTf4/dweoD6C56KyqrblgxLRxgnZRHjxa5rWxH97q9xSOJpOhcMo0 yLNQ== X-Gm-Message-State: AOAM53249oJW9C27uM0Fk6MfPZTTPAxKlGqp6Em3pK5k+NgOn+CJbmPO MmKkWRCYAItANKPJTpBeDRxRGi0DyzE= X-Google-Smtp-Source: ABdhPJy1gnDFm3ujbjcZ4PA/phI6Xoe7BriXKDInvEbZK/diw7C+pPKhpdPMfdyvwq+t6ax5lz1zqg== X-Received: by 2002:adf:e604:0:b0:203:d866:f741 with SMTP id p4-20020adfe604000000b00203d866f741mr3758136wrm.391.1647519517667; Thu, 17 Mar 2022 05:18:37 -0700 (PDT) Received: from baligh-ThinkCentre-M720q.iliad.local (freebox.vlq16.iliad.fr. [213.36.7.13]) by smtp.googlemail.com with ESMTPSA id p3-20020a05600c358300b00389f8158b6bsm7947889wmq.4.2022.03.17.05.18.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 05:18:36 -0700 (PDT) From: Baligh Gasmi X-Google-Original-From: Baligh Gasmi To: hostap@lists.infradead.org Cc: Baligh Gasmi Subject: [PATCH] Fix MIN() macro Date: Thu, 17 Mar 2022 13:18:34 +0100 Message-Id: <20220317121834.520545-1-bgasmi@freebox.fr> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220317_051840_489582_94542F63 X-CRM114-Status: GOOD ( 11.82 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Fix macro and avoid macro definition within function. Signed-off-by: Baligh Gasmi --- wpa_supplicant/scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index b0094ca6c..4265f25ee 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -24,6 +24,9 @@ #include "scan.h" #include "mesh. [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:42d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [gasmibal[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: hostap@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Hostap" Errors-To: hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Fix macro and avoid macro definition within function. Signed-off-by: Baligh Gasmi --- wpa_supplicant/scan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpa_supplicant/scan.c b/wpa_supplicant/scan.c index b0094ca6c..4265f25ee 100644 --- a/wpa_supplicant/scan.c +++ b/wpa_supplicant/scan.c @@ -24,6 +24,9 @@ #include "scan.h" #include "mesh.h" +#ifndef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif static void wpa_supplicant_gen_assoc_event(struct wpa_supplicant *wpa_s) { @@ -2046,12 +2049,10 @@ struct wpabuf * wpa_scan_get_vendor_ie_multi(const struct wpa_scan_res *res, return buf; } - /* Compare function for sorting scan results. Return >0 if @b is considered * better. */ static int wpa_scan_result_compar(const void *a, const void *b) { -#define MIN(a,b) a < b ? a : b struct wpa_scan_res **_wa = (void *) a; struct wpa_scan_res **_wb = (void *) b; struct wpa_scan_res *wa = *_wa; @@ -2116,7 +2117,6 @@ static int wpa_scan_result_compar(const void *a, const void *b) if (snr_b_full == snr_a_full) return wb->qual - wa->qual; return snr_b_full - snr_a_full; -#undef MIN }