aboutsummaryrefslogtreecommitdiffstats
path: root/bench/libtommath.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-04-27 04:05:06 +0200
committerMattias Andrée <maandree@kth.se>2016-04-27 04:05:10 +0200
commit4b7277e4276fd612c161bc3447f508b52ae3ed37 (patch)
tree144ea7d024ea747dc58df73f0cba2074746a3207 /bench/libtommath.h
parentFix typo, thank you Neven (diff)
downloadlibzahl-4b7277e4276fd612c161bc3447f508b52ae3ed37.tar.gz
libzahl-4b7277e4276fd612c161bc3447f508b52ae3ed37.tar.bz2
libzahl-4b7277e4276fd612c161bc3447f508b52ae3ed37.tar.xz
Fix const-correctness in libtommath translation and add error checking in hebimath translation
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'bench/libtommath.h')
-rw-r--r--bench/libtommath.h6
1 files changed, 3 insertions, 3 deletions
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