[lttng-dev] [PATCH babeltrace] Fix ctf_clock_declaration_visit returning an error when reading a boolean

Jérémie Galarneau jeremie.galarneau at efficios.com
Mon Aug 12 21:59:56 EDT 2013


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 <jeremie.galarneau at efficios.com>
---
 formats/ctf/metadata/ctf-visitor-generate-io-struct.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/formats/ctf/metadata/ctf-visitor-generate-io-struct.c b/formats/ctf/metadata/ctf-visitor-generate-io-struct.c
index 664d0af..c7de92e 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);
 		}
-- 
1.8.3.4




More information about the lttng-dev mailing list