From patchwork Wed May 19 21:15:28 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luiz Capitulino X-Patchwork-Id: 53025 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7EFEEB7BEE for ; Thu, 20 May 2010 07:18:46 +1000 (EST) Received: from localhost ([127.0.0.1]:40047 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEqf5-0003Km-L2 for incoming@patchwork.ozlabs.org; Wed, 19 May 2010 17:18:43 -0400 Received: from [140.186.70.92] (port=44973 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OEqcJ-0002IS-H0 for qemu-devel@nongnu.org; Wed, 19 May 2010 17:15:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OEqcE-0007Ba-Ky for qemu-devel@nongnu.org; Wed, 19 May 2010 17:15:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65529) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OEqcE-0007BW-8b for qemu-devel@nongnu.org; Wed, 19 May 2010 17:15:46 -0400 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o4JLFjAq006699 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 19 May 2010 17:15:45 -0400 Received: from localhost (vpn-8-1.rdu.redhat.com [10.11.8.1]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o4JLFgLu010955; Wed, 19 May 2010 17:15:43 -0400 From: Luiz Capitulino To: aliguori@us.ibm.com Date: Wed, 19 May 2010 18:15:28 -0300 Message-Id: <1274303733-3700-2-git-send-email-lcapitulino@redhat.com> In-Reply-To: <1274303733-3700-1-git-send-email-lcapitulino@redhat.com> References: <1274303733-3700-1-git-send-email-lcapitulino@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Cc: qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH 1/6] json-lexer: Initialize 'x' and 'y' X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org The 'lexer' variable is passed by the caller, it can contain anything (eg. garbage). Signed-off-by: Luiz Capitulino --- json-lexer.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/json-lexer.c b/json-lexer.c index 9d64920..0b145d1 100644 --- a/json-lexer.c +++ b/json-lexer.c @@ -275,6 +275,7 @@ void json_lexer_init(JSONLexer *lexer, JSONLexerEmitter func) lexer->emit = func; lexer->state = IN_START; lexer->token = qstring_new(); + lexer->x = lexer->y = 0; } static int json_lexer_feed_char(JSONLexer *lexer, char ch)