From patchwork Thu Apr 26 14:02:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 134519 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp2390526lji; Thu, 26 Apr 2018 07:03:28 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKtlmCNo47L0JgZnrmmsOxGw2sgipT4NuKy77fqhY7B+MZ8AiVMgRm5XIhFr6oz1C+peaH X-Received: by 2002:ac8:2447:: with SMTP id d7-v6mr37813778qtd.50.1524751407876; Thu, 26 Apr 2018 07:03:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524751407; cv=none; d=google.com; s=arc-20160816; b=besY1SRyYn/mrh7YVxCim5T2TUAdzwSPUIS6Cn9HGxuZodV110dsf9Sxuw/GuVeuyZ wsBqje7X/riY4THxkW+z7/57DYuBnyY2yAOjExfEmPo6TgXMsfI2v8AYTFxkicTz0JUO AwAr06/QtZXUjSi90ACPg6e1BRSjDWvfkEh9eoRW985Rj2X2YoyXSrNp3AAywZR9odhY PKkE1Kse0f+MYdb5aH8/vuq+dOE3RmixKzSlhk1pEjC4QGhQnDVKub8LYdUa42YIG8mT E0HOU/QzsJWU2xs6IbHNXbD6u5XOC8xNbOCfvYqii8MbDhFe+0l8785jCppwW2saanVr WNxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:message-id:date:to:from :arc-authentication-results; bh=DIBTYguz8j0b9IJdikMNG/OHhM+bQuYHD4aVF5CIQVw=; b=NS1uSUqXj1wGLWqg11VWnztNNZTGRktwpdyPy/8Nhnd2grVqXFapg9IXZ0EYX465/6 4tIRf3Nu0KXchELBsguQ7+bPxWd9LhWc9/wgI6WrxMKs3CRMn6eKKUN9vBsrp42qpO94 vF49qCmMhcj1+4uvXaI9aAWlX39161O96AuYhyHFHXiaaXkv4xObW0Tqmf3YgYp1diSS Y4RyQYOdRkFQ7xp7C8F1+mvdpqSO8B5W96rJufANdoKTX9UUiDmmboDzuQ3LaQYsCxux 4+jYbLVfXRHOfCj7ZtyW2106XmNqqYXaKaFnEqDqWzwq7+ySFht82SZhpUDdeezjyZm+ a7jA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [2001:4830:134:3::11]) by mx.google.com with ESMTPS id 71si4704224qkx.370.2018.04.26.07.03.27 for (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 26 Apr 2018 07:03:27 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) client-ip=2001:4830:134:3::11; Authentication-Results: mx.google.com; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 2001:4830:134:3::11 as permitted sender) smtp.mailfrom=qemu-devel-bounces+patch=linaro.org@nongnu.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:42475 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBhUd-0006P9-Dh for patch@linaro.org; Thu, 26 Apr 2018 10:03:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fBhUD-0006N5-UT for qemu-devel@nongnu.org; Thu, 26 Apr 2018 10:03:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fBhUA-0008AB-54 for qemu-devel@nongnu.org; Thu, 26 Apr 2018 10:03:01 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:41160) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fBhU9-00088x-U7; Thu, 26 Apr 2018 10:02:58 -0400 Received: from pm215 by orth.archaic.org.uk with local (Exim 4.89) (envelope-from ) id 1fBhU6-0005sq-Gt; Thu, 26 Apr 2018 15:02:54 +0100 From: Peter Maydell To: qemu-devel@nongnu.org, qemu-trivial@nongnu.org Date: Thu, 26 Apr 2018 15:02:53 +0100 Message-Id: <20180426140253.3918-1-peter.maydell@linaro.org> X-Mailer: git-send-email 2.17.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2001:8b0:1d0::2 Subject: [Qemu-devel] [PATCH] vl.c: Don't zero-initialize statics for serial_hds 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: Paolo Bonzini , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" checkpatch reminds us that statics shouldn't be zero-initialized: ERROR: do not initialise statics to 0 or NULL #35: FILE: vl.c:157: +static int num_serial_hds = 0; ERROR: do not initialise statics to 0 or NULL #36: FILE: vl.c:158: +static Chardev **serial_hds = NULL; I forgot to fix this in 6af2692e86f9fdfb3d; do so now. Signed-off-by: Peter Maydell --- I wouldn't bother with this except that I forgot to fold it in when applying the serial-limits patchset. vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.17.0 Reviewed-by: Thomas Huth diff --git a/vl.c b/vl.c index 616956adf1..6d8b869dad 100644 --- a/vl.c +++ b/vl.c @@ -154,8 +154,8 @@ QEMUClockType rtc_clock; int vga_interface_type = VGA_NONE; static DisplayOptions dpy; int no_frame; -static int num_serial_hds = 0; -static Chardev **serial_hds = NULL; +static int num_serial_hds; +static Chardev **serial_hds; Chardev *parallel_hds[MAX_PARALLEL_PORTS]; Chardev *virtcon_hds[MAX_VIRTIO_CONSOLES]; Chardev *sclp_hds[MAX_SCLP_CONSOLES];