From patchwork Tue Jul 18 06:09:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 789917 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=208.118.235.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="p5+hKZNq"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xBVbF0XWkz9t2J for ; Tue, 18 Jul 2017 16:28:09 +1000 (AEST) Received: from localhost ([::1]:54283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXLzK-0007rN-Pz for incoming@patchwork.ozlabs.org; Tue, 18 Jul 2017 02:28:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60635) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXLsx-00027z-Bl for qemu-devel@nongnu.org; Tue, 18 Jul 2017 02:21:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXLsw-0001P5-J5 for qemu-devel@nongnu.org; Tue, 18 Jul 2017 02:21:31 -0400 Received: from mail-qt0-x242.google.com ([2607:f8b0:400d:c0d::242]:33869) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXLst-0001JF-Pw; Tue, 18 Jul 2017 02:21:27 -0400 Received: by mail-qt0-x242.google.com with SMTP id 19so1352315qty.1; Mon, 17 Jul 2017 23:21:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/CA7NWKYdKJ+KI3ooEDtsm/4OeiMB2fARutvIN/0SsQ=; b=p5+hKZNqrcoPEctQZeUAyUPlpCEqkDmjIirxdVIycaCKFp/WNIL1q2FWslGpWpIG0q JQyAgTtYKJ77AE8KGhteK4qfwczchZEqurIPBCVL2boW6V9ME+6AScgBZO45zZWT7S6h mVKHEC4O1DYS+lNjwCYyTISZ/HwmV2ojaaGbARbyPPcR8zLYx+Tv7Fzp5nSdp2ZrkuLK AyPlMhgjHd6Jl8sRMnCrYG47IMxq8fo54UEif500whGGY9KztjojK+t5L/UYjHz8Nft/ YgF421CH8GGjNKzfcuFOGZn86lyy7tqhoHrKUVv4Hh10OlFtpd8NZWxAUpNNLDJ6PIgH lUFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=/CA7NWKYdKJ+KI3ooEDtsm/4OeiMB2fARutvIN/0SsQ=; b=F43zczSK8/fxnecwJEQML/N/FP7CaNh4vOY7GWy50s8T8I9wJwYAB2VIihcacgKF+n RPgpAOwv5JiXI1vTW4d429/87nWDVLzCgPGPTrPcv4TnAaOg8IicOulrHnChHutdRQkc rZequxKb9RjxW+VehfZqk75NqWwrIkK6LnpyHmhMJg4acMJ8QpmAdx5QkPRXe5ji0UAS 6jfN5AQt+2Rv15i93UvdLDjHl2M5RCcQLz8raXOvSXMcLhCTV7t0O0Kpam3JRZMe+yea xD5jNEgs3TFn9RG72GRJ0qYvbREbfEJnXQJyNVmn0+uS1rgFjMJ9JDJXh0VX8pHHm6k9 10aQ== X-Gm-Message-State: AIVw113YIHMCzGG+OaeTr5JvJro0vEPcGpwkVdTJ4uEh/Fzl/ZmmfCZm wGCz0jY46El1x7bHzAJ4ZQ== X-Received: by 10.237.38.71 with SMTP id z65mr93553qtc.21.1500358887247; Mon, 17 Jul 2017 23:21:27 -0700 (PDT) Received: from yoga.offpageads.com ([138.117.48.223]) by smtp.gmail.com with ESMTPSA id l31sm1099862qtc.64.2017.07.17.23.21.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jul 2017 23:21:26 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-trivial@nongnu.org, Michael Roth Date: Tue, 18 Jul 2017 03:09:57 -0300 Message-Id: <20170718061005.29518-22-f4bug@amsat.org> X-Mailer: git-send-email 2.13.2 In-Reply-To: <20170718061005.29518-1-f4bug@amsat.org> References: <20170718061005.29518-1-f4bug@amsat.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400d:c0d::242 Subject: [Qemu-devel] [PATCH 21/29] qga: use ARRAY_SIZE macro 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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Applied using the Coccinelle semantic patch scripts/coccinelle/use_osdep.cocci Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Marc-André Lureau --- qga/commands-posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index d8e412275e..2a5d5cb4ba 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -896,7 +896,7 @@ static void build_guest_fsinfo_for_real_device(char const *syspath, if (p && sscanf(q, "%u", &host) == 1) { has_host = true; nhosts = build_hosts(syspath, p, has_ata, hosts, - sizeof(hosts) / sizeof(hosts[0]), errp); + ARRAY_SIZE(hosts), errp); if (nhosts < 0) { goto cleanup; }