From c0d63a17c1d2590b216cc8b972d345422948411c Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Mon, 24 May 2010 17:08:43 -0300 Subject: [PATCH 3/9] json-lexer: Initialize 'x' and 'y' RH-Author: Luiz Capitulino Message-id: <1274720927-19579-2-git-send-email-lcapitulino@redhat.com> Patchwork-id: 9505 O-Subject: [PATCH 1/5] json-lexer: Initialize 'x' and 'y' Bugzilla: 589952 RH-Acked-by: Gerd Hoffmann RH-Acked-by: Juan Quintela RH-Acked-by: Paolo Bonzini Bugzilla: 589952 Upstream status: Submitted 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(-) Signed-off-by: Eduardo Habkost --- 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) -- 1.7.0.3