Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4180359rwb; Mon, 31 Jul 2023 02:51:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlFcDt141N9h7dyL3Y1rBmT6One/Mzd4LxC1EX/V9vRQC5qGuxSCYAMDtxYwF9TfGx1HfMh6 X-Received: by 2002:a17:90b:4b42:b0:268:808:8e82 with SMTP id mi2-20020a17090b4b4200b0026808088e82mr11034624pjb.1.1690797088995; Mon, 31 Jul 2023 02:51:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690797088; cv=none; d=google.com; s=arc-20160816; b=Rv+buIJ/1bzHfIywP8JDsbGt8dncj9uw4C7xOxIlbMrRnkB3LWJ8d/aV7eBHIwfOCo O3wCUPFWTBjI7V8ZIcCF7hMo8upVJj6IovaVWP2g+HrUQ0gcePbjWjFx3QNVfNoUlWzS nOG85gSJ5LqpCqi0icY/eBPE+XBglzzQspOMWLqbPVQGPS1d3xNarxLq1P9dDF1HD3DU ivxcVZSzealG/zmJ8tNyhS7PVCffZhk8Q427bK829Ct1ZFuV25dx/pLRMoLC2H2+gIS1 LTjyMwwM6YGabPtkF0QGkT4MsqN7bY76OvmrXdeMjClONtlgMezQQre1B6Iw3zje7BYI XJ0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Zn7EspLMJURaKiY5Gjn5zv2wVyOyzZar0tbAp0hZ2XM=; fh=316TVNV5QA6FBQd7uqFD8JV7cFnuxf4xjki7YnOJWZ8=; b=Di3UXt2poOBNLLus1Aw6iVSuA1cjbgh1lZuCnJQyPyxv58dxmPqma1lFWV/OL1cMKd ZRxMSuiSx3SOx7g83cHQlVaI9rTLwRPX8F+sXqoM/E1VaC+RvX6tVrPL0h+11LL9C/rZ 8ooK6fb8E6yG+W61WsiJlgOkITntYbuIh5I2ZJ6punhma7R9ruaUCrwKzRspJbJfWKNM HKPVzbHKpetVXr+/u2awVzXRODenPVMu2mgYCT7fiCx5a5tBumG4/UlCRGHGBWkzo7HH 78aZrmR1ek94LqPDPpFerYkoO9WBAm4iIlWkBslL5cM2uF2F3/fMYLHJucTApA7eBldR psnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LrcfL9eq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p1-20020a17090a74c100b00263a643aaacsi7054044pjl.11.2023.07.31.02.51.13; Mon, 31 Jul 2023 02:51:28 -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; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=LrcfL9eq; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229962AbjGaJaH (ORCPT + 99 others); Mon, 31 Jul 2023 05:30:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229552AbjGaJaG (ORCPT ); Mon, 31 Jul 2023 05:30:06 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1D748F3 for ; Mon, 31 Jul 2023 02:30:05 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 36V7tgW5026390; Mon, 31 Jul 2023 09:29:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=qcppdkim1; bh=Zn7EspLMJURaKiY5Gjn5zv2wVyOyzZar0tbAp0hZ2XM=; b=LrcfL9eqDA4ZNY9GpXVH3fh0Fowy4kn5UzT+ulNNd1P+gJnKytpI50d8drqsmAgYiNZk sN+5hYAvJqS1XrtLYaXB3zrZUDJyvKoxdIHFTZPhoNsGACEdoUsXKidSnIwQSWacIpvH KEovaPO1fxI7zzNFp97okBAafs/QK6+q5ZJCmoTCPdq5A9OhAzhjUj86mlHpraZ/wYSh Zhe290XAJBmWKqWQLIy/zUz4xSMrCHXVRi+Yi1FnemoWvyOgnclQCcyCcDZNc7J6d/RI JZRM2/nlvjnO1cULF2bHWJCq+3+775FXzId3vOcsolGTKU8HjGNYpqaUgZGWKAI8bd4S AA== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3s4uanu5wv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 09:29:53 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 36V9Tqao027639 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 31 Jul 2023 09:29:52 GMT Received: from zijuhu-gv.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Mon, 31 Jul 2023 02:29:50 -0700 From: Zijun Hu To: , CC: , Subject: [PATCH BlueZ v2] main: Fix integer configuration option parse failures Date: Mon, 31 Jul 2023 17:28:42 +0800 Message-ID: <1690795722-29873-1-git-send-email-quic_zijuhu@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1690789604-3576-1-git-send-email-quic_zijuhu@quicinc.com> References: <1690789604-3576-1-git-send-email-quic_zijuhu@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nasanex01a.na.qualcomm.com (10.52.223.231) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: SEFLG3o-J0ibU99TgiXsvY9ArCYJkHJi X-Proofpoint-ORIG-GUID: SEFLG3o-J0ibU99TgiXsvY9ArCYJkHJi X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-31_03,2023-07-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 lowpriorityscore=0 bulkscore=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxscore=0 suspectscore=0 spamscore=0 mlxlogscore=999 phishscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2307310085 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,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 parse_config_int() has a obvious logical error, so causes many parse failures of integer configuration options, fixed by this change. --- 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; } -- 2.7.4