From patchwork Fri Mar 8 09:59:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: vricosti X-Patchwork-Id: 13586617 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11olkn2010.outbound.protection.outlook.com [40.92.20.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B50B91DA21 for ; Fri, 8 Mar 2024 09:59:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.92.20.10 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709891973; cv=fail; b=MSdLDwuIQwp3S75BSMIqSYnCnWSBWjQwfx2Ms/ZvHKFreLK8azQuHb/LB/aHW6MaotUCHRljGLKFcq413pLKYqMIiAhDi7jzBB9RbjR0NS7um+73DcaNPvswHzoJu9Oq//e+FssqXyTK/Roi8l0PixR54+be3dyZ9tNo+OPtMag= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709891973; c=relaxed/simple; bh=cBc2Z1d4h/+GFFqByp6d5XbtMCm2fRkidZLyfd0I/Fo=; h=Message-ID:Date:From:Subject:To:Cc:Content-Type:MIME-Version; b=pjh5fWBDo9CfbTkWnnV1BRMZvHipSVrd28Ch4xIpq8cuRjtM/bNFpQgctl1UFCvt5PvkpxPv5Mrd1Eb9sMCY7Bgpp08siMzC90Tq9uQbAQkiLLgLOl4nm4cSOAXEBtSS8gf9U3Mw38rFSJSlV4uFMoxe0UrMZ7KSulA0mOCMTbk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com; spf=pass smtp.mailfrom=outlook.com; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b=kkYYjBvD; arc=fail smtp.client-ip=40.92.20.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=outlook.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=outlook.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=outlook.com header.i=@outlook.com header.b="kkYYjBvD" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VEKXaKMnXeQExlZHYF7cWCKFVuegQu8DPefGKShliDN2yHl+rqa0IQCvTWAPCoBEDrhs3W3QaQiPNPMFbSPE5yl6DO1oD/WT72RbxZylLkAgZbxG7U0T5YcVrqprMSH1dipRqFOJjsGPRqV8rshvQtV3iXrVrmix8LQLokIavNPgtiX2F2XGuWQC5quC3ldCGa+xY4GUwFOjp92jnYtJdDC2nHHP6ofsQM1Fgd6iw22CQRa7aRHuaiJa/ly/oXsS3g/zf2KpR8d/jqFwRcSe46GDcUBrVz2NDUf8FDUKbbAvIEvDtb5zvwK0GGy4GDz/Ih21yLuR/jN8PsEt4k1r8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mguPLySyQoAWbCVedn1v1SINwcvb4shDzq+VXMBbkww=; b=NPTc++g6p7LNvTOrf7lI1XA82cQ0QgGsPInE6sBquKusElp5TLVuG2Uzj0MD4Cxc/yih3pPekv5GwN7cAOpgINpGqXcfm+caYRNIWZQNMvVHtnI3+85IHsHV9hLDbLqtV//Maq8mRaKxR19wHUxrSgcJXBd0qrKckgZLIaqbelagbXWpePgHy28DcH5MZcbz89OYrfCQoiJtvvayOzyzYmrRtgDkEt9NdT4Iqi91ARafhoISoxb9zhgxAWvROYmiVKmfhzAlOhdkZ5RMYdLfRjS/HFaGjuKwhvqCHQdN9/JsjXrraIen7Ui+o41bIJ747+XMQLYwydKpGdTkWnnAfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mguPLySyQoAWbCVedn1v1SINwcvb4shDzq+VXMBbkww=; b=kkYYjBvDnWbOKT+BaFQ/gnKL6wRfyCE6zd96yBUGo7Ljc5Yuj2n4O5IsKH3FdVZXyBLxuX6sqeMVvov46WImZ7ZfKz8tEmLIi9UJnoZJ2YHXRirF/S5WPjr1VS8aIXbFiJeTcL/WQGD0fJJvO5EBcto03bI3IOU2WdNGsdCCszaqV/GlOhC0SDukV9nWRs7NUH/QreTRq90xa1qs3j2zlzgpJaH6lEXIvOU451a9fV17/ULf76Wxlc1YgGfzSOBg0cvM2sfo+LZkMkMIWxReKzayRzTLtVeGPpM7Z4SY7NNbsuPs3ERW5fhxGVoo/aKQRfpjtpv99NGr5uF2n/D4pg== Received: from BL3PR19MB6514.namprd19.prod.outlook.com (2603:10b6:208:3b9::10) by CO6PR19MB5369.namprd19.prod.outlook.com (2603:10b6:303:144::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.28; Fri, 8 Mar 2024 09:59:29 +0000 Received: from BL3PR19MB6514.namprd19.prod.outlook.com ([fe80::707b:75e3:8c68:45f8]) by BL3PR19MB6514.namprd19.prod.outlook.com ([fe80::707b:75e3:8c68:45f8%6]) with mapi id 15.20.7362.019; Fri, 8 Mar 2024 09:59:29 +0000 Message-ID: Date: Fri, 8 Mar 2024 10:59:27 +0100 User-Agent: Mozilla Thunderbird From: Vince Ricosti Subject: [PATCH] add missing errno before strtol To: linux-media@vger.kernel.org Content-Language: en-US Cc: sean@mess.org X-TMN: [FmNSoJC63q879qmnqzOthNtxJzarXlarKaFbIBcFy77SFHE3fXnZBk4BleFusL9k] X-ClientProxiedBy: PAZP264CA0209.FRAP264.PROD.OUTLOOK.COM (2603:10a6:102:237::14) To BL3PR19MB6514.namprd19.prod.outlook.com (2603:10b6:208:3b9::10) X-Microsoft-Original-Message-ID: <33a90dd0-24bd-43d1-a698-9b62057ea299@outlook.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL3PR19MB6514:EE_|CO6PR19MB5369:EE_ X-MS-Office365-Filtering-Correlation-Id: 5115c062-adb2-4391-69ec-08dc3f5671d6 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0PdmzlvPvVXciVphwxmYV3+Tvh7Z6mDvjYiaSKx7PlvsNyYRWq8X4+hgXv97Azg5lbgi+9D+jeUl4UM+b8FTldi8pvMeaNv52s2z6eVGndO30XwIMdze5H1c4U+/zO5n7Z+dmT4XWROOr9CD+uHB1X2EFb9ilO20fddzXXZ5V88xhuSOQaoOC2AgGFI/vIIxLYdbGxDHaTxUpgObOrcoeVowwaBGHF8UX6OG/cpiYem1debkXK5pQmO/Iw0AbVGyEs1uIaCuCoKO8eVghHFEHBUF8hELTZQz1XZj1i78p5LlkEdlQcFnaeeZFdSEBXgqrIjLb5dHorg2Y/OPRjj79pCn+sGBJ2SVmQIAHf+hgMERrPqr0bec6kc4fXvVmRF3BgvrT274BBTQ9813jnp8rBUX2zYg6yx+YAVDG5euG6rK9jBn616p5h9QnzyZ13WFNqDTOin0cMY1zjuMKeZl6Pd4nTZZMxtgXvY7hcHTsJWXE4vwmY3X0D9yeGbNZrL7L+4sIuO6PcYBGEUnQyULLAOTPWiPgI7l7lIRYwkmqKr5aojxFr04VgDG94CBSEOj X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?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ad9Z3PTeM66f/0zqEocGJbIQcKsGbcYjZWBEPQO33dOe?= =?utf-8?q?jfxM3u5P7CYelht792UtKwZH+c493nqSXCmo0Gs4sRY/JoIlL0+5FqsMTilEz5x3q?= =?utf-8?q?EqKOtQLYaUGWLFsr9no/wN+ozcjCp+q9py0j3tlDZ9oYbnaYsDGmcMWseJ4IsFyYv?= =?utf-8?q?3S1afm6GaeMrsDyzItCG5wJxdQxxP9VRwAoCZmUHJQCszB9y2fCylhI2kGuFmgw4q?= =?utf-8?q?WqdRTSyy5zshNy5jLJP4ePaOh27xkgYRgDh21UHMlVv7Z6olypNizQSoCwK4mHurp?= =?utf-8?q?rEJ5PHbxQ/9TWdKgC8DJDCuepQerPnZy8IzWO3OlZLntxxOjfToqriY7Nbdd/foQA?= =?utf-8?q?TdzhNjov8AVXp3CxIW6yn/6Jh3Q2CK0McuBu1vl9MkMpdDx8RHPQAlRpbIXU=3D?= X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5115c062-adb2-4391-69ec-08dc3f5671d6 X-MS-Exchange-CrossTenant-AuthSource: BL3PR19MB6514.namprd19.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Mar 2024 09:59:29.2395 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO6PR19MB5369 When testing yesterday the latest master on my raspberry pi I could not send my usual file because when entering read_file_raw the errno was already wrong (don't asky why because this morning it works). Anyway since strtol do not update errno except for overflow conditions it's better to set it to 0 as done in other parts of code. Signed-off-by: Vince Ricosti --- utils/ir-ctl/ir-ctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c index c480a2b1..e662651e 100644 --- a/utils/ir-ctl/ir-ctl.c +++ b/utils/ir-ctl/ir-ctl.c @@ -413,6 +413,7 @@ static struct send *read_file_raw(struct arguments *args, const char *fname, FIL (keyword[0] == '/' && keyword[1] == '/')) break; + errno = 0; value = strtol(keyword, &p, 10); if (errno || *p) { fprintf(stderr, _("%s:%d: error: expected integer, got `%s'\n"),