summaryrefslogtreecommitdiffstats
path: root/lib/historical_volatility.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/historical_volatility.c')
-rw-r--r--lib/historical_volatility.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/historical_volatility.c b/lib/historical_volatility.c
index cde0d91..5848d1c 100644
--- a/lib/historical_volatility.c
+++ b/lib/historical_volatility.c
@@ -23,7 +23,7 @@ ts_parameter_t const ts_historical_volatility_p = { .n_inputs = 1, .n_outputs =
uint_t ts_historical_volatility_offset( ts_constant_t const *c )
{
( void )c;
- return ( c ? ((ts_historical_volatility_params_t *)c)->k > 0 ? ((ts_historical_volatility_params_t *)c)->k - 1 : 0 : 0 );
+ return ( c ? ((ts_historical_volatility_params_t const *)c)->k > 0 ? ((ts_historical_volatility_params_t const *)c)->k - 1 : 0 : 0 );
}
int ts_historical_volatility(
@@ -34,7 +34,7 @@ int ts_historical_volatility(
{
TS_PROLOGUE( ts_historical_volatility_p );
if ( !c ) return -1;
- uint_t k = ((ts_historical_volatility_params_t *)c)->k;
+ uint_t k = ((ts_historical_volatility_params_t const *)c)->k;
if (k == 0 || n < k + 1) return -1;
for ( uint_t d = k - 1; d < n - 1; ++d )