From 4b7277e4276fd612c161bc3447f508b52ae3ed37 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 27 Apr 2016 04:05:06 +0200 Subject: Fix const-correctness in libtommath translation and add error checking in hebimath translation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- bench/libtommath.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bench/libtommath.h') diff --git a/bench/libtommath.h b/bench/libtommath.h index 08c7c18..3529118 100644 --- a/bench/libtommath.h +++ b/bench/libtommath.h @@ -346,7 +346,7 @@ zmodpowu(z_t r, z_t a, unsigned long long int b, z_t m) } static inline void -zsets(z_t a, char *s) +zsets(z_t a, const char *s) { try(mp_read_radix(a, s, 10)); } @@ -382,9 +382,9 @@ zsave(z_t a, char *b) } static inline size_t -zload(z_t a, char *b) /* Note, requires that zsave was called directly prior. */ +zload(z_t a, const char *b) /* Note, requires that zsave was called directly prior. */ { - return mp_read_signed_bin(a, (unsigned char *)b, _tmp); + return mp_read_signed_bin(a, (const unsigned char *)b, _tmp); } static inline void -- cgit v1.2.3-70-g09d2