diff --git a/lib/hcrypto/libtommath/bn_error.c b/lib/hcrypto/libtommath/bn_error.c index b1b7177e6..fbba7aa1f 100644 --- a/lib/hcrypto/libtommath/bn_error.c +++ b/lib/hcrypto/libtommath/bn_error.c @@ -17,7 +17,7 @@ static const struct { int code; - char *msg; + const char *msg; } msgs[] = { { MP_OKAY, "Successful" }, { MP_MEM, "Out of heap" }, @@ -25,7 +25,7 @@ static const struct { }; /* return a char * string for a given code */ -char *mp_error_to_string(int code) +const char *mp_error_to_string(int code) { int x; diff --git a/lib/hcrypto/libtommath/tommath.h b/lib/hcrypto/libtommath/tommath.h index 84d3f7a59..0517b22c8 100644 --- a/lib/hcrypto/libtommath/tommath.h +++ b/lib/hcrypto/libtommath/tommath.h @@ -189,8 +189,8 @@ typedef int ltm_prime_callback(unsigned char *dst, int len, void *dat); #define DIGIT(m,k) ((m)->dp[(k)]) #define SIGN(m) ((m)->sign) -/* error code to char* string */ -char *mp_error_to_string(int code); +/* error code to const char* string */ +const char *mp_error_to_string(int code); /* ---> init and deinit bignum functions <--- */ /* init a bignum */