From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752939AbdIFKZh (ORCPT ); Wed, 6 Sep 2017 06:25:37 -0400 Received: from mout.web.de ([212.227.15.4]:62583 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752508AbdIFKZd (ORCPT ); Wed, 6 Sep 2017 06:25:33 -0400 Subject: [PATCH 3/3] ALSA: bebob: Improve a size determination in parse_stream_formation() From: SF Markus Elfring To: alsa-devel@alsa-project.org, Clemens Ladisch , Jaroslav Kysela , Takashi Iwai Cc: LKML , kernel-janitors@vger.kernel.org References: <85f95150-9cec-7a53-7692-837ba543e1ec@users.sourceforge.net> Message-ID: <3092a93b-9991-eca8-bc77-5c973355477e@users.sourceforge.net> Date: Wed, 6 Sep 2017 12:24:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <85f95150-9cec-7a53-7692-837ba543e1ec@users.sourceforge.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:x7/x/O7Og2RnK2oM7oJsPI+oS9tbkl/LqAXYgtj10zSkgdlA8PC z1g//J78/lgbWbmREGH1RC5uDLzvUucR2Bubtr+my1p26sVdnqD3hRJk9jRPtYcWQ8+bq4b o5Kl/kl27aRBL1D0RiFeH6E6zsjm5K0iI3ASLZL2E5HBBjNkxMsPvfkrSexSzAxmQot7LSZ bSTUbKMN4nqcWja0Pjn5A== X-UI-Out-Filterresults: notjunk:1;V01:K0:FMF6lQJnpC8=:bEUuXanAvU3mHS9LKj+mPu qB7wx5tYlME8fOIMs386OnGdpXMkUrVHK97vss0ikBg2pyzZrjjEhjxKeuMR7/A5kUeDvhy8B FhYhaFizvPXpSEUXvvYTml4mWodhG407cp4GjevP4pTyrkFuHrOt1vcvtXRjpFA3dIUpSWRJ5 85JsntoNNEiTb3sXruiN6GulyXRt19k6pX0974f/eWETzZ6cNgMfWZzEHe5yxGqYm4iKBSsK+ BkjGvZookzlQLjTqU46A9xgQV+Y9dRN0N8LXwA9qXRnxqmAnaU4lydkok0DkZwFpts0V6rvk3 QWoLofA0WEe2VOvs2vasyb1r1umFFDB5jxqLHaIpEktvbTUil1bi9CGdZy19ltr7T9MuUEGyA DTNkkeR/GDPipBnZZGdyFgsBsspV7t4L6VqhIX2mB1UtOg5yEKNZNkr2d+6yvEe8/k2VBPa0M VHBBqVA7ptZVbbWOV9zijF80TOM/1SnSk3fjRharaAvtmhC15V+E44n//NDslXX5hOw9VrfBp TG/BN7sdjHeD19jiv3/DBwS5qr3hIwh9pH65umH8VFtoG/rlcMWrrNnaI6jTyIEDnzQ1AhsS6 QFoxiufTayq21nFgaRE7q76pjCuzJkZPoeWuDDedid4dV6lkGQb1NCjBf92bpwl4y6ceKg2Dm wIfKDs896zambRuQjJs8q+BGdyhTHIrQ7GC8xgR3Qd2o3MgZkKmU9f95y9D9eNb/HQjUJ8s6H 7JfEUnT4UOD/yaoKe7JcTlimG8L3D+hgXZceiwSl1N+jiswe7S8w2iXXhTahoESfzsVne31mN 1T/Dm5pXM3i6fssMiV7R2eC0SyQmiSK6+iczHGLJwyfoxwlV9U= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Wed, 6 Sep 2017 11:55:45 +0200 Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. Signed-off-by: Markus Elfring --- sound/firewire/bebob/bebob_stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/firewire/bebob/bebob_stream.c b/sound/firewire/bebob/bebob_stream.c index 211ff43207d6..a26863b82330 100644 --- a/sound/firewire/bebob/bebob_stream.c +++ b/sound/firewire/bebob/bebob_stream.c @@ -736,7 +736,7 @@ parse_stream_formation(u8 *buf, unsigned int len, return -ENOSYS; /* Avoid double count by different entries for the same rate. */ - memset(&formation[i], 0, sizeof(struct snd_bebob_stream_formation)); + memset(&formation[i], 0, sizeof(*formation)); for (e = 0; e < buf[4]; e++) { channels = buf[5 + e * 2]; -- 2.14.1