From: Mathieu Desnoyers Date: Sat, 11 Mar 2017 13:39:22 +0000 (-0500) Subject: filter: use SIZE_MAX for size_t X-Git-Tag: v2.10.0-rc1~7 X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=commitdiff_plain;h=2339237cc8d7ceb743c61522cbd3822a45932ea0 filter: use SIZE_MAX for size_t The backing type is a size_t, so use SIZE_MAX to represent infinity. Signed-off-by: Mathieu Desnoyers --- diff --git a/lttng-filter-interpreter.c b/lttng-filter-interpreter.c index a09b0417..f4d5a946 100644 --- a/lttng-filter-interpreter.c +++ b/lttng-filter-interpreter.c @@ -726,7 +726,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, ret = -EINVAL; goto end; } - estack_ax(stack, top)->u.s.seq_len = UINT_MAX; + estack_ax(stack, top)->u.s.seq_len = SIZE_MAX; estack_ax(stack, top)->u.s.literal_type = ESTACK_STRING_LITERAL_TYPE_NONE; estack_ax(stack, top)->u.s.user = 0; @@ -790,7 +790,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, dbg_printk("load string %s\n", insn->data); estack_push(stack, top, ax, bx); estack_ax(stack, top)->u.s.str = insn->data; - estack_ax(stack, top)->u.s.seq_len = UINT_MAX; + estack_ax(stack, top)->u.s.seq_len = SIZE_MAX; estack_ax(stack, top)->u.s.literal_type = ESTACK_STRING_LITERAL_TYPE_PLAIN; estack_ax(stack, top)->u.s.user = 0; @@ -805,7 +805,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, dbg_printk("load globbing pattern %s\n", insn->data); estack_push(stack, top, ax, bx); estack_ax(stack, top)->u.s.str = insn->data; - estack_ax(stack, top)->u.s.seq_len = UINT_MAX; + estack_ax(stack, top)->u.s.seq_len = SIZE_MAX; estack_ax(stack, top)->u.s.literal_type = ESTACK_STRING_LITERAL_TYPE_STAR_GLOB; estack_ax(stack, top)->u.s.user = 0; @@ -870,7 +870,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, ret = -EINVAL; goto end; } - estack_ax(stack, top)->u.s.seq_len = UINT_MAX; + estack_ax(stack, top)->u.s.seq_len = SIZE_MAX; estack_ax(stack, top)->u.s.literal_type = ESTACK_STRING_LITERAL_TYPE_NONE; estack_ax(stack, top)->u.s.user = 0; @@ -920,7 +920,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data, ret = -EINVAL; goto end; } - estack_ax(stack, top)->u.s.seq_len = UINT_MAX; + estack_ax(stack, top)->u.s.seq_len = SIZE_MAX; estack_ax(stack, top)->u.s.literal_type = ESTACK_STRING_LITERAL_TYPE_NONE; estack_ax(stack, top)->u.s.user = 1;