From nobody Fri May 17 19:31:20 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VgxsP1Ybcz5LgTt; Fri, 17 May 2024 19:31:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VgxsN5xD5z3wlR; Fri, 17 May 2024 19:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715974280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NEO64mDGBB4UtUz6E0bTfK+ss/nj8rcVHI6x0AtUt7c=; b=Mf1ZsSiol9HuSanmmitB2RuGbVJSWsXmTilOPqiITURSbN8Dta8VapxFlRClAl/j7S7JZ4 tmLiG/OyH79ZjjHPhPIPzcSbgXVZgVmfznv1RmPqXUsqY1nxnFMbKpHbO5VGvnnTGREVLG uJHBVVufu0dFl3DXyOSjD7ZNqQR5H5Ld/A+Tn6D5Nrs4LwIGxCdS8FGShO6cNdNqWrpBrc D/rzoBVy6N68r9sUQVWtzVgIkSMc6RZ4F/AzSxn6doXSm86KJVBCHyyV66BDw/vjhWmPti YdQTlp5PREl7Ad2xAtHm8HR/caOrNGtj6504Dh5gA425N1/wiPKdyWwOv9iNTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715974280; a=rsa-sha256; cv=none; b=d+OFxXTu86Lhjf/Y8ili4cG7fa4x+6s8K1x+IialxAjoAPGh8paxn7w2Bm8be9fdLahj9L jgM/l+ttxciqUDHySi1FPCkjKchkXx6yxUrRQuxDflAHOXq9tg25v41CfXStgbboNSp7Gs JSpTy6cmf8rMQb2MpONwVZc8NMrBmwXssBJRAM5Fz06Y1B48KV/OY7RL3Hv0acT1XpUHL2 3lvZnyOIpyjcBGgqg8+3ky+vb1DZjzXa4SkT+KWugLfc37q9d886LXPtRNcGjzdJsjpfZg gROwBM8IOAExcZgltXg5rJa1SeYUke05u4rkFzNtKTkKuP3d0pyU/y/sRCA9ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715974280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NEO64mDGBB4UtUz6E0bTfK+ss/nj8rcVHI6x0AtUt7c=; b=y309nNH+pyP5TeoD4Cd2mbczjaftBVTw8XTJL/d3NqZ5Npj4rzX0XnSjS5ThJQG4w3/LgE 3KWHEn+cp3ILDYBhDOsavUO+4Xxoc7EiEhVIom60m7oXNaQLCPofIG5KBRH8bjhhO+I+Sr zGLUUjVMCdMpyH/VgsCQdIYiWkNZqQLVofRDtI3rq6kmfuom6QfUDuLBUWO1QmMj0tVs6r sYiTpbs8QIHxdtJKmCS5n+mouUvL2l9fOwvk4Vr/Hv9pfyXhGUDdLckqXyg5LpyRgOsxww +t0DOruRWo1FoS64aK6/nltMaM4QHiA61PxQV5CkBQjXUiwh0dQ3H46mG5yg1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VgxsN5Y9BzvfP; Fri, 17 May 2024 19:31:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44HJVK6H000449; Fri, 17 May 2024 19:31:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44HJVKhL000445; Fri, 17 May 2024 19:31:20 GMT (envelope-from git) Date: Fri, 17 May 2024 19:31:20 GMT Message-Id: <202405171931.44HJVKhL000445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: a19d42b08a40 - stable/14 - sound: Remove ncards variable from sound_oss_card_info() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a19d42b08a40cda6af119f14236e166e178bd2cd Auto-Submitted: auto-generated The branch stable/14 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=a19d42b08a40cda6af119f14236e166e178bd2cd commit a19d42b08a40cda6af119f14236e166e178bd2cd Author: Christos Margiolis AuthorDate: 2024-05-14 13:42:20 +0000 Commit: Christos Margiolis CommitDate: 2024-05-17 19:30:36 +0000 sound: Remove ncards variable from sound_oss_card_info() The loop counter is also the card's index, so ncards is redundant. Sponsored by: The FreeBSD Foundation MFC after: 3 days Reviewed by: dev_submerge.ch Differential Revision: https://reviews.freebsd.org/D45144 (cherry picked from commit 305db91d4b92a5d53826dcb6df39fc8a1f3b427e) --- sys/dev/sound/pcm/sound.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c index 3e95fd0e0ea4..e66462af2a71 100644 --- a/sys/dev/sound/pcm/sound.c +++ b/sys/dev/sound/pcm/sound.c @@ -792,9 +792,7 @@ int sound_oss_card_info(oss_card_info *si) { struct snddev_info *d; - int i, ncards; - - ncards = 0; + int i; for (i = 0; pcm_devclass != NULL && i < devclass_get_maxunit(pcm_devclass); i++) { @@ -802,7 +800,7 @@ sound_oss_card_info(oss_card_info *si) if (!PCM_REGISTERED(d)) continue; - if (ncards++ != si->card) + if (i != si->card) continue; PCM_UNLOCKASSERT(d);