projects
/
sdk
/
emulator
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e2029a
)
json-lexer: Initialize 'x' and 'y'
author
Luiz Capitulino
<lcapitulino@redhat.com>
Mon, 17 May 2010 20:50:01 +0000
(17:50 -0300)
committer
Luiz Capitulino
<lcapitulino@redhat.com>
Fri, 11 Jun 2010 18:25:14 +0000
(15:25 -0300)
The 'lexer' variable is passed by the caller, it can contain anything
(eg. garbage).
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
json-lexer.c
patch
|
blob
|
history
diff --git
a/json-lexer.c
b/json-lexer.c
index
9d64920
..
0b145d1
100644
(file)
--- 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)