From 3d92926a902017e7cf1f5738e99ff62da596ce12 Mon Sep 17 00:00:00 2001 From: Ethan Werner Date: Sun, 9 Aug 2026 15:02:21 +0400 Subject: refactor --- lib/schaff_trend_cycle.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/schaff_trend_cycle.c') diff --git a/lib/schaff_trend_cycle.c b/lib/schaff_trend_cycle.c index f4584e6..0ff3e1c 100644 --- a/lib/schaff_trend_cycle.c +++ b/lib/schaff_trend_cycle.c @@ -35,9 +35,8 @@ int ts_schaff_trend_cycle( { TS_PROLOGUE( ts_schaff_trend_cycle_p ); if ( !c ) return -1; - uint_t period = ((ts_schaff_trend_cycle_params_t *)c)->period; + uint_t period = ((ts_schaff_trend_cycle_params_t const *)c)->period; if (period == 0) period = 3; - if (n == 0) return -1; if (period > n) { for (uint_t j = 0; j < n; ++j) { y[0][j] = 0; y[1][j] = 0; } return 0; } uint_t fast = 10; -- cgit v1.3.1