From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-177.mta1.migadu.com (out-177.mta1.migadu.com [95.215.58.177]) (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 BAFA2246BBA for ; Tue, 7 Apr 2026 18:19:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.177 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775585943; cv=none; b=ud5klfy9G1HJC3MoNqPs87k0T2e5d6FI9dty00VOAa5atkwzya8IS1JaGvmf/Viq9fxSKLBJZI28z4jSnSNPTZma4bhmHEcJK9OLFs08Hk58/756oXbae2ywLk3EeUaPL0a8sID3SBqrfkVK+YvYh8DJY+U/CCxzIrfzhJbnoCU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775585943; c=relaxed/simple; bh=Bu2oGNHPQTJg5TXAH0vezVSgDr5u7WHsZ5ye8OQ5tV4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=eh+RQ/eLeSWACIB9Q3lwJmQ7ht0pA28GjwzjzU655m/ups9JJ+fj1ITgBaMKagrnllURXrGKJmsBxWouV0eu2sTNIyJFFWt33FvYSb+836PawCtMw8nawWYZItMJuTAJXE6F/o/IAlVUEKYXN+sZTQ56gqLlt+aXSG9c688JjFM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=ashhlXtU; arc=none smtp.client-ip=95.215.58.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="ashhlXtU" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1775585939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=HPdL+N7z8hcQ2UzvMtDw6HBuOCSbgwVjf7GxkTm9Kco=; b=ashhlXtURlqfEsiHvoVXO3KTgjxey7vhsjZbtcGBiPrtYD406pNCrSB+KX9odEpQ73s/Z9 UITfA+sgzbz9jy4Drgur2vaaRR8L3f+94Qk4qyYmfZ4n2/ALYK7QMi0BShge1hTqM9UHJE lIoFe9Iw28pnM5dFwVL1i0lrlBNiqBw= From: Thorsten Blum To: Andrew Morton , Petr Mladek , Steven Rostedt , Andy Shevchenko , Rasmus Villemoes , Sergey Senozhatsky Cc: Thorsten Blum , linux-kernel@vger.kernel.org Subject: [PATCH] lib/vsprintf: use bool for local decode variable Date: Tue, 7 Apr 2026 20:18:36 +0200 Message-ID: <20260407181835.1053072-2-thorsten.blum@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1057; i=thorsten.blum@linux.dev; h=from:subject; bh=Bu2oGNHPQTJg5TXAH0vezVSgDr5u7WHsZ5ye8OQ5tV4=; b=owGbwMvMwCUWt7pQ4caZUj3G02pJDJlXvaovJa3sV3FbGXrLTYlpu+Qx++3aPPPcuE6ZbO2+N nH/w7v/OkpZGMS4GGTFFFkezPoxw7e0pnKTScROmDmsTCBDGLg4BWAif34w/E9l0p2658l7176J NpMiZnVIR1TvyP1kJTZ/jnbe1y+zvdcz/FMICurgPakxw/vVXA7R1yzKUdkGp9t36MU7R88o/+N twgcA X-Developer-Key: i=thorsten.blum@linux.dev; a=openpgp; fpr=1D60735E8AEF3BE473B69D84733678FD8DFEEAD4 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT The local variable 'decode' is only used as a boolean value - change its data type from int to bool accordingly. Signed-off-by: Thorsten Blum --- lib/vsprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 800b8ac49f53..9f359b31c8d1 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1107,7 +1107,7 @@ char *resource_string(char *buf, char *end, struct resource *res, 2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)]; char *p = sym, *pend = sym + sizeof(sym); - int decode = (fmt[0] == 'R') ? 1 : 0; + bool decode = fmt[0] == 'R'; const struct printf_spec *specp; if (check_pointer(&buf, end, res, spec)) @@ -1132,7 +1132,7 @@ char *resource_string(char *buf, char *end, struct resource *res, } else { p = string_nocheck(p, pend, "??? ", str_spec); specp = &mem_spec; - decode = 0; + decode = false; } if (decode && res->flags & IORESOURCE_UNSET) { p = string_nocheck(p, pend, "size ", str_spec);