From b714a6c4f1ce0a3dd6d1c0d39b7e2d14d5539d0f Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Mon, 25 May 2020 16:30:10 -0400 Subject: [PATCH] use const char* to ensure pointer validity --- numerical_methods/durand_kerner_roots.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numerical_methods/durand_kerner_roots.c b/numerical_methods/durand_kerner_roots.c index fea73a03..f2839c1a 100644 --- a/numerical_methods/durand_kerner_roots.c +++ b/numerical_methods/durand_kerner_roots.c @@ -33,7 +33,7 @@ long double complex poly_function(double *coeffs, unsigned int degree, long doub return out; } -static inline char *complex_str(long double complex x) +const char *complex_str(long double complex x) { static char msg[50]; double r = creal(x);