Fix ctf_clock_declaration_visit returning an error when reading a boolean
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 22 Aug 2013 16:46:46 +0000 (12:46 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Aug 2013 16:47:36 +0000 (12:47 -0400)
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@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index c32aa990fc23b952f9e5c827532796e1d22c28d1..559e97ecdf65b778034dbf28914036f79003b90d 100644 (file)
@@ -2364,6 +2364,7 @@ int ctf_clock_declaration_visit(FILE *fd, int depth, struct ctf_node *node,
                                goto error;
                        }
                        clock->absolute = ret;
                                goto error;
                        }
                        clock->absolute = ret;
+                       ret = 0;
                } else {
                        fprintf(fd, "[warning] %s: attribute \"%s\" is unknown in clock declaration.\n", __func__, left);
                }
                } else {
                        fprintf(fd, "[warning] %s: attribute \"%s\" is unknown in clock declaration.\n", __func__, left);
                }
This page took 0.025654 seconds and 4 git commands to generate.