Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4153939rwb; Mon, 31 Jul 2023 02:12:18 -0700 (PDT) X-Google-Smtp-Source: APBJJlFRi+C3C+q2XxYB5DoJx5y0RqkeMpk52EfzxZMDPzRQK6hp2qRrzIBpp5QKCz9zvB/YzekO X-Received: by 2002:a05:6a20:d90b:b0:13d:af0e:4ee5 with SMTP id jd11-20020a056a20d90b00b0013daf0e4ee5mr2673879pzb.18.1690794738283; Mon, 31 Jul 2023 02:12:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690794738; cv=none; d=google.com; s=arc-20160816; b=o2cLnog18iF4lKb0FT6e4QAqy4ffglIQZUTlY/haKgYSBpBwk+L90k5VcMx1BcaGcn K0teQzYN7SdQD3q1j2pAF+qCatKLwWYassanp8FT0ShcHMpuKwahCP+ZyfQVVF1iyu/z oYZT/M03ZzlhXh65ayaKsExThL2BJn7hbZlOqrXmJpbabdnUQjW07/Z+hUG4BbK4aKNS g3hkmLxD+Mm7Az2Es+Wez8Q6Kz3nS2VLgjHd7WzUn2sv2KRDuSuQn4wCp72YjUqmCOvC klRV9O86XUlK8u13Ws7cjA9xg9rXc3Lgd+8WTBL+afUeOGRDQrEqtyKxlx/uYk5oYFUa urSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=dOQcWwbztun4Cmrnqx8nAx0DqcVx2cUUtCGCRwHZvCw=; fh=oL9UE6Nxf7v21PBxGk1nn64hfIa8Fo7Gt0sScbHqWOU=; b=yhe48aB7QL/oxQs3zjOm61x2IKPfJ3963z29ezix3MghWugk9tH2IRxQu4KLaz9UYA p5Z/VkNxgoTMHO+E6Gxel+RUT6M5jmEc4yBUNAKx+IjhClAbtUd4N0h1JvVgHDmdQoRW S6sN6K/QXWqyAh62nBFCfl7F7ez0coz39NQsukAaPA0m/dmqw1fzZ5a2Yk//Ya9dHsYL Awqx1w2L0YInekYfeH880C8EaPI5W6U/XRqISCvnqy8zNfy2hSCOdR6lbaiBc2mBd+p3 XF9sZGlcZGECl1e1f9hOhLclE2MWvVjOi4A6gjvMkvd+9O6J6H9hnGsgTSgl7Bycnvp8 5VaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k11-20020a056a00134b00b0067e5edde6eesi7272851pfu.302.2023.07.31.02.11.55; Mon, 31 Jul 2023 02:12:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231249AbjGaIwd (ORCPT + 99 others); Mon, 31 Jul 2023 04:52:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58432 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231277AbjGaIwF (ORCPT ); Mon, 31 Jul 2023 04:52:05 -0400 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA16319A5 for ; Mon, 31 Jul 2023 01:49:13 -0700 (PDT) Received: from [141.14.220.45] (g45.guest.molgen.mpg.de [141.14.220.45]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pmenzel) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 1D27F61E5FE03; Mon, 31 Jul 2023 10:48:55 +0200 (CEST) Message-ID: <698aa5d3-3261-c9d9-d754-d36ae9716eb4@molgen.mpg.de> Date: Mon, 31 Jul 2023 10:48:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.1 Subject: Re: [PATCH v1] main: Fix a logical error within parse_config_int() Content-Language: en-US To: Zijun Hu Cc: luiz.dentz@gmail.com, linux-bluetooth@vger.kernel.org References: <1690789604-3576-1-git-send-email-quic_zijuhu@quicinc.com> From: Paul Menzel In-Reply-To: <1690789604-3576-1-git-send-email-quic_zijuhu@quicinc.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Dear Zijun, Am 31.07.23 um 09:46 schrieb Zijun Hu: > Fix a logical error within parse_config_int(). Thank you for spotting and fixing this. I guess this warning was printed on the terminal? Although obvious, instead of duplicating the commit message summary in the body, it would be great, if you still wrote a more elaborate commit message. Maybe: Having a config file with the line below … causes the config file to be ignored, and the warning below: … > --- > src/main.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/src/main.c b/src/main.c > index 150a5af4cca4..13501440b052 100644 > --- a/src/main.c > +++ b/src/main.c > @@ -458,7 +458,7 @@ static bool parse_config_int(GKeyFile *config, const char *group, > return false; > } > > - if (tmp < max) { > + if (tmp > max) { > warn("%s.%s = %d is out of range (> %d)", group, key, tmp, max); > return false; > } Reviewed-by: Paul Menzel Kind regards, Paul