Handle negative time and offset from Epoch
[babeltrace.git] / formats / ctf / metadata / ctf-visitor-generate-io-struct.c
index 1831b2dcda4e3dff0b22b1d859cd10342777c36b..53d67d24c77ede0c217db3f4282b6a75764e4962 100644 (file)
@@ -2404,7 +2404,7 @@ int ctf_clock_declaration_visit(FILE *fd, int depth, struct ctf_node *node,
                                ret = -EPERM;
                                goto error;
                        }
-                       ret = get_unary_unsigned(&node->u.ctf_expression.right, &clock->offset_s);
+                       ret = get_unary_signed(&node->u.ctf_expression.right, &clock->offset_s);
                        if (ret) {
                                fprintf(fd, "[error] %s: unexpected unary expression for clock offset_s\n", __func__);
                                ret = -EINVAL;
@@ -2416,7 +2416,7 @@ int ctf_clock_declaration_visit(FILE *fd, int depth, struct ctf_node *node,
                                ret = -EPERM;
                                goto error;
                        }
-                       ret = get_unary_unsigned(&node->u.ctf_expression.right, &clock->offset);
+                       ret = get_unary_signed(&node->u.ctf_expression.right, &clock->offset);
                        if (ret) {
                                fprintf(fd, "[error] %s: unexpected unary expression for clock offset\n", __func__);
                                ret = -EINVAL;
This page took 0.024128 seconds and 4 git commands to generate.