uuid wrapper: fix use in visitor
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Mar 2012 23:27:24 +0000 (18:27 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 1 Mar 2012 23:27:24 +0000 (18:27 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
formats/ctf/metadata/ctf-visitor-generate-io-struct.c

index 6a577b92be8396fc077980233c03e2b7991bfb64..119114c0377a8d153d409ad973a9c75389d34df4 100644 (file)
 #include <assert.h>
 #include <glib.h>
 #include <inttypes.h>
-#include <endian.h>
 #include <errno.h>
 #include <babeltrace/babeltrace-internal.h>
 #include <babeltrace/list.h>
 #include <babeltrace/types.h>
 #include <babeltrace/ctf/metadata.h>
 #include <babeltrace/uuid.h>
+#include <babeltrace/endian.h>
 #include "ctf-scanner.h"
 #include "ctf-parser.h"
 #include "ctf-ast.h"
@@ -220,7 +220,7 @@ int get_unary_signed(struct bt_list_head *head, int64_t *value)
 }
 
 static
-int get_unary_uuid(struct bt_list_head *head, uuid_t *uuid)
+int get_unary_uuid(struct bt_list_head *head, unsigned char *uuid)
 {
        struct ctf_node *node;
        int i = 0;
@@ -234,7 +234,7 @@ int get_unary_uuid(struct bt_list_head *head, uuid_t *uuid)
                assert(node->u.unary_expression.link == UNARY_LINK_UNKNOWN);
                assert(i == 0);
                src_string = node->u.unary_expression.u.string;
-               ret = babeltrace_uuid_parse(src_string, *uuid);
+               ret = babeltrace_uuid_parse(src_string, uuid);
        }
        return ret;
 }
@@ -2035,9 +2035,9 @@ int ctf_trace_declaration_visit(FILE *fd, int depth, struct ctf_node *node, stru
                        }
                        CTF_TRACE_SET_FIELD(trace, minor);
                } else if (!strcmp(left, "uuid")) {
-                       uuid_t uuid;
+                       unsigned char uuid[BABELTRACE_UUID_LEN];
 
-                       ret = get_unary_uuid(&node->u.ctf_expression.right, &uuid);
+                       ret = get_unary_uuid(&node->u.ctf_expression.right, uuid);
                        if (ret) {
                                fprintf(fd, "[error] %s: unexpected unary expression for trace uuid\n", __func__);
                                ret = -EINVAL;
This page took 0.036151 seconds and 4 git commands to generate.