wrapper: remove types.h wrapper
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Apr 2020 18:26:24 +0000 (14:26 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 13 Apr 2020 18:26:24 +0000 (14:26 -0400)
lttng-events.c
lttng-filter-interpreter.c
wrapper/types.h [deleted file]

index 24e817bd47d4d8c1cee894e4e34653b0f47d1d24..ff13b7c09f9aa76e72e754a5525c086837411cc5 100644 (file)
 #include <linux/uuid.h>
 #include <linux/dmi.h>
 #include <linux/vmalloc.h>
+#include <linux/limits.h>
 
 #include <wrapper/random.h>
 #include <wrapper/list.h>
-#include <wrapper/types.h>
 #include <lttng-kernel-version.h>
 #include <lttng-events.h>
 #include <lttng-tracer.h>
@@ -1183,8 +1183,8 @@ static
 int lttng_match_enabler_star_glob(const char *desc_name,
                const char *pattern)
 {
-       if (!strutils_star_glob_match(pattern, LTTNG_SIZE_MAX,
-                       desc_name, LTTNG_SIZE_MAX))
+       if (!strutils_star_glob_match(pattern, SIZE_MAX,
+                       desc_name, SIZE_MAX))
                return 0;
        return 1;
 }
index 1d09fdee26fb807d646f0836c14b1451f56469aa..671f8b8a7dc45769edfaabb68b3d3fec4613b1af 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <linux/uaccess.h>
 #include <linux/frame.h>
-#include <wrapper/types.h>
+#include <linux/limits.h>
 #include <linux/swab.h>
 
 #include <lttng-filter.h>
@@ -551,7 +551,7 @@ static int dynamic_load_field(struct estack_entry *stack_top)
                        ret = -EINVAL;
                        goto end;
                }
-               stack_top->u.s.seq_len = LTTNG_SIZE_MAX;
+               stack_top->u.s.seq_len = SIZE_MAX;
                stack_top->u.s.literal_type =
                        ESTACK_STRING_LITERAL_TYPE_NONE;
                break;
@@ -1128,7 +1128,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
                                ret = -EINVAL;
                                goto end;
                        }
-                       estack_ax(stack, top)->u.s.seq_len = LTTNG_SIZE_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;
@@ -1192,7 +1192,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 = LTTNG_SIZE_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;
@@ -1207,7 +1207,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 = LTTNG_SIZE_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;
@@ -1272,7 +1272,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
                                ret = -EINVAL;
                                goto end;
                        }
-                       estack_ax(stack, top)->u.s.seq_len = LTTNG_SIZE_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;
@@ -1322,7 +1322,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
                                ret = -EINVAL;
                                goto end;
                        }
-                       estack_ax(stack, top)->u.s.seq_len = LTTNG_SIZE_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;
@@ -1538,7 +1538,7 @@ uint64_t lttng_filter_interpret_bytecode(void *filter_data,
                                ret = -EINVAL;
                                goto end;
                        }
-                       estack_ax(stack, top)->u.s.seq_len = LTTNG_SIZE_MAX;
+                       estack_ax(stack, top)->u.s.seq_len = SIZE_MAX;
                        estack_ax(stack, top)->u.s.literal_type =
                                ESTACK_STRING_LITERAL_TYPE_NONE;
                        next_pc += sizeof(struct load_op);
diff --git a/wrapper/types.h b/wrapper/types.h
deleted file mode 100644 (file)
index 00d9af6..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-/* SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
- *
- * wrapper/types.h
- *
- * Copyright (C) 2017 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
- */
-
-#ifndef _LTTNG_WRAPPER_TYPES_H
-#define _LTTNG_WRAPPER_TYPES_H
-
-#define LTTNG_SIZE_MAX (~(size_t)0)
-
-#endif /* _LTTNG_WRAPPER_TYPES_H */
This page took 0.031272 seconds and 4 git commands to generate.