mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-04-01 22:48:25 +00:00
MINOR: stick-table: use smp_expr_output_type() to retrieve the output type of a "struct sample_expr"
It's just a minor cleanup.
This commit is contained in:
parent
348971ea28
commit
f73eb8f1dc
@ -665,19 +665,15 @@ struct stktable_key *stktable_fetch_key(struct stktable *t, struct proxy *px, st
|
|||||||
*/
|
*/
|
||||||
int stktable_compatible_sample(struct sample_expr *expr, unsigned long table_type)
|
int stktable_compatible_sample(struct sample_expr *expr, unsigned long table_type)
|
||||||
{
|
{
|
||||||
|
int out_type;
|
||||||
|
|
||||||
if (table_type >= STKTABLE_TYPES)
|
if (table_type >= STKTABLE_TYPES)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
if (LIST_ISEMPTY(&expr->conv_exprs)) {
|
out_type = smp_expr_output_type(expr);
|
||||||
if (!sample_to_key[expr->fetch->out_type][table_type])
|
if (!sample_to_key[out_type][table_type])
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
|
||||||
struct sample_conv_expr *conv_expr;
|
|
||||||
conv_expr = LIST_PREV(&expr->conv_exprs, typeof(conv_expr), list);
|
|
||||||
|
|
||||||
if (!sample_to_key[conv_expr->conv->out_type][table_type])
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user