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-Url: http://git.efficios.com/?p=babeltrace.git;a=commitdiff_plain;h=be59aa1005711f38937aaf0f727374b4d092b354 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 c32aa990..559e97ec 100644 --- a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c +++ b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c @@ -2364,6 +2364,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); }