aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/lib/traceevent/event-parse.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 4d5092f67167..476626af7317 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -2047,6 +2047,18 @@ static int arg_num_eval(struct print_arg *arg, long long *val)
2047 break; 2047 break;
2048 *val = left - right; 2048 *val = left - right;
2049 break; 2049 break;
2050 case '+':
2051 if (arg->op.left->type == PRINT_NULL)
2052 left = 0;
2053 else
2054 ret = arg_num_eval(arg->op.left, &left);
2055 if (!ret)
2056 break;
2057 ret = arg_num_eval(arg->op.right, &right);
2058 if (!ret)
2059 break;
2060 *val = left + right;
2061 break;
2050 default: 2062 default:
2051 do_warning("unknown op '%s'", arg->op.op); 2063 do_warning("unknown op '%s'", arg->op.op);
2052 ret = 0; 2064 ret = 0;