int uexpr_type = node->u.unary_expression.type;
int uexpr_link = node->u.unary_expression.link;
int cond = node->type != NODE_UNARY_EXPRESSION ||
- (uexpr_type != UNARY_UNSIGNED_CONSTANT) ||
(uexpr_type != UNARY_UNSIGNED_CONSTANT &&
uexpr_type != UNARY_SIGNED_CONSTANT) ||
uexpr_link != UNARY_LINK_UNKNOWN || i != 0;
goto end;
}
- switch (node->u.unary_expression.type) {
+ switch (uexpr_type) {
case UNARY_UNSIGNED_CONSTANT:
*value = (int64_t)
node->u.unary_expression.u.unsigned_constant;
_SET(set, _CLOCK_PRECISION_SET);
} else if (!strcmp(left, "offset_s")) {
- uint64_t offset_s;
+ int64_t offset_s;
if (_IS_SET(set, _CLOCK_OFFSET_S_SET)) {
_BT_LOGE_DUP_ATTR(entry_node, "offset_s",
goto error;
}
- ret = get_unary_unsigned(
+ ret = get_unary_signed(
&entry_node->u.ctf_expression.right, &offset_s);
if (ret) {
_BT_LOGE_NODE(entry_node,
_SET(set, _CLOCK_OFFSET_S_SET);
} else if (!strcmp(left, "offset")) {
- uint64_t offset;
+ int64_t offset;
if (_IS_SET(set, _CLOCK_OFFSET_SET)) {
_BT_LOGE_DUP_ATTR(entry_node, "offset", "clock class");
goto error;
}
- ret = get_unary_unsigned(
+ ret = get_unary_signed(
&entry_node->u.ctf_expression.right, &offset);
if (ret) {
_BT_LOGE_NODE(entry_node,