If the cast function to execute is c_none, dont execute it and return
true. The function c_none, do nothing. This save a call.
struct sample_fetch *find_sample_fetch(const char *kw, int len);
int smp_resolve_args(struct proxy *p);
int smp_expr_output_type(struct sample_expr *expr);
+int c_none(struct sample *smp);
/*
* This function just apply a cast on sample. It returns 0 if the cast is not
{
if (!sample_casts[sample->type][req_type])
return 0;
+ if (sample_casts[sample->type][req_type] == c_none)
+ return 1;
return sample_casts[sample->type][req_type](sample);
}
}
-static int c_none(struct sample *smp)
+int c_none(struct sample *smp)
{
return 1;
}