From: Jérémie Galarneau Date: Thu, 22 Aug 2013 16:46:46 +0000 (-0400) Subject: Fix ctf_clock_declaration_visit returning an error when reading a boolean X-Git-Tag: v1.2.0-rc1~74^2~10 X-Git-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=9bac50fae8baa13c06a0a9682f2547d7e1476404 Fix ctf_clock_declaration_visit returning an error when reading a boolean The ret variable is used to read the "absolute" field's value and was not reset to zero, thus returning an error whenever that value was TRUE. Signed-off-by: Jérémie Galarneau Signed-off-by: Mathieu Desnoyers --- diff --git a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c index 664d0af1..c7de92e6 100644 --- a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c +++ b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c @@ -2399,6 +2399,7 @@ int ctf_clock_declaration_visit(FILE *fd, int depth, struct ctf_node *node, goto error; } clock->absolute = ret; + ret = 0; } else { fprintf(fd, "[warning] %s: attribute \"%s\" is unknown in clock declaration.\n", __func__, left); }