From patchwork Mon Mar 11 19:11:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 1054814 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=vivier.eu Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44J76D5mCcz9s5c for ; Tue, 12 Mar 2019 06:12:52 +1100 (AEDT) Received: from localhost ([127.0.0.1]:38814 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3QLx-0005Pi-96 for incoming@patchwork.ozlabs.org; Mon, 11 Mar 2019 15:12:49 -0400 Received: from eggs.gnu.org ([209.51.188.92]:60003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3QL0-0005Ht-HB for qemu-devel@nongnu.org; Mon, 11 Mar 2019 15:11:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3QKz-0003R3-Pj for qemu-devel@nongnu.org; Mon, 11 Mar 2019 15:11:50 -0400 Received: from mout.kundenserver.de ([212.227.17.13]:35901) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3QKz-0003PA-Eh; Mon, 11 Mar 2019 15:11:49 -0400 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MV6G0-1hSCyc0iqU-00S5WQ; Mon, 11 Mar 2019 20:11:36 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Mon, 11 Mar 2019 20:11:24 +0100 Message-Id: <20190311191128.30562-2-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190311191128.30562-1-laurent@vivier.eu> References: <20190311191128.30562-1-laurent@vivier.eu> MIME-Version: 1.0 X-Provags-ID: V03:K1:V3rV00znpLrw2EPDqF8QZ1krrSFLot7j6A2eDzXgF0rILoCbU+U XZ7i9XUUoLPB8A64OD4YwS2bllQxHDP/gom8khwhau+FDP+eXbbnIgFD2OJdn9k7Qm/WoI+ +v/LK0pmToMzEbs74NYHQmRV48DN9GN9ftu5m5Xz5omHtthS1U+8k0zZe7QmqUu3kTDgxr0 OlF2lK5fsyS1nn+Zv5hIw== X-UI-Out-Filterresults: notjunk:1; V03:K0:keO88pR/iVE=:HKErR4ObzhAp0fky+vXTD/ e+Ob1NGKRRpEYDweZvzmr4341GRfTXb9KWeK8j259ae92cVrvPW9tGSbHjcrvqfK+FhQB5sND QN7pEvZDXTj3mDvvYiL+7Xn6fnBrimwBJMQFPGZpAfV7gzpUWvYAjI2qIyUJyZR99+PFk02G4 B99K/bK34XH0qnoL7G3Ubo+xy45CSR+lmurO5Sz+wGqE6mMYDK11iTrTUCGfQJCMsh7vunUjD 3D2JEKJZGAnbnvkDsqtyrbkQfGkTcTdFXXJYVDXWtiiAguKMNLwu9z677+lPithZKsN786VNG ZuE6ZcH/7IL6f6N05zpCz2xr/jsJQUzTtv8QsRz4bSKl3mC0//TIFAAsBNeSdA4Bd4PFhXatE 3vxT+Up5mT/eheFc53Qm+x9R+dMsCRlsThP0kLcH46CWVbrdldgb5r6BrXpVM7GGqk4lzMd7T iWg7iKoj9wn3V67UGrmvAVYZr/wllU3kJz2sYm2mrlSzeynIH9K0sP2xYlUg/oG1iO8n/Cz+M ZligjUQ/UusyoLHOpWAFicyEwEhlg/8n3sOouerifnqknV6cL9/VVoFPO4th1fukCspFhs/Ow H6HC+FQMVeTwCM+QNLzlIdgmh6A+wns4pw/epyUOVZXrdCwyUNx2UsA+S3y3ReLx+HOEhYO0i e+t3TAghcLfvCKoQ3HClg+GI51hLxIMcU7lE1OwVrstEJIWHCkPe2m2VZToeXMV4kqOj41D16 Na+VyLWth8eAGiE2GSyCC7PUuQe60/1mmnykHQ== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL 1/5] thunk: improve readability of allocation loop X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Stefan Hajnoczi , "Michael S. Tsirkin" , qemu-trivial@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Riku Voipio , Michael Tokarev , Laurent Vivier , qemu-arm@nongnu.org, Gerd Hoffmann , Igor Mammedov , Paolo Bonzini , Laszlo Ersek , Aarushi Mehta Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: Aarushi Mehta Signed-off-by: Aarushi Mehta Reviewed-by: Stefan Hajnoczi Message-Id: Signed-off-by: Laurent Vivier --- thunk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thunk.c b/thunk.c index 17f3d320bb8e..7f31cffe0968 100644 --- a/thunk.c +++ b/thunk.c @@ -86,7 +86,7 @@ void thunk_register_struct(int id, const char *name, const argtype *types) #endif /* now we can alloc the data */ - for(i = 0;i < 2; i++) { + for (i = 0; i < ARRAY_SIZE(se->field_offsets); i++) { offset = 0; max_align = 1; se->field_offsets[i] = g_new(int, nb_fields);