diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-08-19 09:39:33 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-09-12 04:43:34 (GMT) |
commit | 155c500b8933d2c7269215ea1d141d341de0a44f (patch) | |
tree | 520c55ae047f8e47236bc4476aa43011a226708d /src/analysis/scan/exprs/counter.c | |
parent | 9cceceee1691a9f6c36df508d278d5fb9af9f122 (diff) |
Remove old unused code.
Diffstat (limited to 'src/analysis/scan/exprs/counter.c')
-rw-r--r-- | src/analysis/scan/exprs/counter.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/analysis/scan/exprs/counter.c b/src/analysis/scan/exprs/counter.c index bb4e523..7fadb91 100644 --- a/src/analysis/scan/exprs/counter.c +++ b/src/analysis/scan/exprs/counter.c @@ -50,7 +50,7 @@ static void g_scan_match_counter_finalize(GScanMatchCounter *); /* Réduit une expression à une forme plus simple. */ -static ScanReductionState g_scan_match_counter_reduce(GScanMatchCounter *, GScanContext *, GScanScope *, GScanExpression **); +static ScanReductionState g_scan_match_counter_reduce(const GScanMatchCounter *, GScanContext *, GScanScope *, GScanExpression **); @@ -195,11 +195,14 @@ bool g_scan_match_counter_create(GScanMatchCounter *counter, GSearchPattern *pat { bool result; /* Bilan à retourner */ - result = true; + result = g_scan_expression_create(G_SCAN_EXPRESSION(counter), SRS_WAIT_FOR_SCAN); + if (!result) goto exit; counter->pattern = pattern; g_object_ref(G_OBJECT(pattern)); + exit: + return result; } @@ -226,7 +229,7 @@ bool g_scan_match_counter_create(GScanMatchCounter *counter, GSearchPattern *pat * * ******************************************************************************/ -static ScanReductionState g_scan_match_counter_reduce(GScanMatchCounter *expr, GScanContext *ctx, GScanScope *scope, GScanExpression **out) +static ScanReductionState g_scan_match_counter_reduce(const GScanMatchCounter *expr, GScanContext *ctx, GScanScope *scope, GScanExpression **out) { ScanReductionState result; /* Etat synthétisé à retourner */ size_t count; /* Quantité de correspondances */ |