projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common: replace uses of calloc(..., 1) with zmalloc
[lttng-tools.git]
/
src
/
common
/
filter
/
filter-visitor-generate-ir.cpp
diff --git
a/src/common/filter/filter-visitor-generate-ir.cpp
b/src/common/filter/filter-visitor-generate-ir.cpp
index a109ca60a7d756f33e960ee624bc961e86e16432..3705ce4f283453ed190e4f9d75bdca02bdc2d6ca 100644
(file)
--- a/
src/common/filter/filter-visitor-generate-ir.cpp
+++ b/
src/common/filter/filter-visitor-generate-ir.cpp
@@
-31,7
+31,7
@@
struct ir_op *make_op_root(struct ir_op *child, enum ir_side side)
{
struct ir_op *op;
{
struct ir_op *op;
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
switch (child->data_type) {
if (!op)
return NULL;
switch (child->data_type) {
@@
-80,7
+80,7
@@
struct ir_op *make_op_load_string(const char *string, enum ir_side side)
{
struct ir_op *op;
{
struct ir_op *op;
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_LOAD;
if (!op)
return NULL;
op->op = IR_OP_LOAD;
@@
-101,7
+101,7
@@
struct ir_op *make_op_load_numeric(int64_t v, enum ir_side side)
{
struct ir_op *op;
{
struct ir_op *op;
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_LOAD;
if (!op)
return NULL;
op->op = IR_OP_LOAD;
@@
-118,7
+118,7
@@
struct ir_op *make_op_load_float(double v, enum ir_side side)
{
struct ir_op *op;
{
struct ir_op *op;
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_LOAD;
if (!op)
return NULL;
op->op = IR_OP_LOAD;
@@
-192,12
+192,12
@@
struct ir_load_expression *create_load_expression(struct filter_node *node)
node = load_expression_get_forward_chain(node);
if (!node)
return NULL;
node = load_expression_get_forward_chain(node);
if (!node)
return NULL;
- load_exp = (ir_load_expression *)
calloc(sizeof(struct ir_load_expression), 1
);
+ load_exp = (ir_load_expression *)
zmalloc(sizeof(struct ir_load_expression)
);
if (!load_exp)
return NULL;
/* Root */
if (!load_exp)
return NULL;
/* Root */
- load_exp_op = (ir_load_expression_op *)
calloc(sizeof(struct ir_load_expression_op), 1
);
+ load_exp_op = (ir_load_expression_op *)
zmalloc(sizeof(struct ir_load_expression_op)
);
if (!load_exp_op)
goto error;
load_exp->child = load_exp_op;
if (!load_exp_op)
goto error;
load_exp->child = load_exp_op;
@@
-229,7
+229,7
@@
struct ir_load_expression *create_load_expression(struct filter_node *node)
struct filter_node *bracket_node;
prev_op = load_exp_op;
struct filter_node *bracket_node;
prev_op = load_exp_op;
- load_exp_op = (ir_load_expression_op *)
calloc(sizeof(struct ir_load_expression_op), 1
);
+ load_exp_op = (ir_load_expression_op *)
zmalloc(sizeof(struct ir_load_expression_op)
);
if (!load_exp_op)
goto error;
prev_op->next = load_exp_op;
if (!load_exp_op)
goto error;
prev_op->next = load_exp_op;
@@
-248,7
+248,7
@@
struct ir_load_expression *create_load_expression(struct filter_node *node)
fprintf(stderr, "[error] Expecting constant index in array expression\n");
goto error;
}
fprintf(stderr, "[error] Expecting constant index in array expression\n");
goto error;
}
- load_exp_op = (ir_load_expression_op *)
calloc(sizeof(struct ir_load_expression_op), 1
);
+ load_exp_op = (ir_load_expression_op *)
zmalloc(sizeof(struct ir_load_expression_op)
);
if (!load_exp_op)
goto error;
prev_op->next = load_exp_op;
if (!load_exp_op)
goto error;
prev_op->next = load_exp_op;
@@
-263,7
+263,7
@@
struct ir_load_expression *create_load_expression(struct filter_node *node)
}
/* Add final load field */
prev_op = load_exp_op;
}
/* Add final load field */
prev_op = load_exp_op;
- load_exp_op = (ir_load_expression_op *)
calloc(sizeof(struct ir_load_expression_op), 1
);
+ load_exp_op = (ir_load_expression_op *)
zmalloc(sizeof(struct ir_load_expression_op)
);
if (!load_exp_op)
goto error;
prev_op->next = load_exp_op;
if (!load_exp_op)
goto error;
prev_op->next = load_exp_op;
@@
-281,7
+281,7
@@
struct ir_op *make_op_load_expression(struct filter_node *node,
{
struct ir_op *op;
{
struct ir_op *op;
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_LOAD;
if (!op)
return NULL;
op->op = IR_OP_LOAD;
@@
-312,7
+312,7
@@
struct ir_op *make_op_unary(enum unary_op_type unary_op_type,
goto error;
}
goto error;
}
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_UNARY;
if (!op)
return NULL;
op->op = IR_OP_UNARY;
@@
-380,7
+380,7
@@
struct ir_op *make_op_binary_compare(enum op_type bin_op_type,
goto error;
}
goto error;
}
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_BINARY;
if (!op)
return NULL;
op->op = IR_OP_BINARY;
@@
-461,7
+461,7
@@
struct ir_op *make_op_binary_logical(enum op_type bin_op_type,
goto error;
}
goto error;
}
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_LOGICAL;
if (!op)
return NULL;
op->op = IR_OP_LOGICAL;
@@
-505,7
+505,7
@@
struct ir_op *make_op_binary_bitwise(enum op_type bin_op_type,
goto error;
}
goto error;
}
- op = (ir_op *)
calloc(sizeof(struct ir_op), 1
);
+ op = (ir_op *)
zmalloc(sizeof(struct ir_op)
);
if (!op)
return NULL;
op->op = IR_OP_BINARY;
if (!op)
return NULL;
op->op = IR_OP_BINARY;
This page took
0.024872 seconds
and
4
git commands to generate.