summaryrefslogtreecommitdiff
path: root/mpi/mpi-mpow.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2013-12-12 15:13:09 +0100
committerWerner Koch <wk@gnupg.org>2013-12-12 15:28:06 +0100
commit3b30e9840d4b351c4de73b126e561154cb7df4cc (patch)
treeef3d2d1127165ef5866840d33ccde9d35a2dee33 /mpi/mpi-mpow.c
parentcd548ba2dc777b8b27d8d33182ba733c20222120 (diff)
downloadlibgcrypt-3b30e9840d4b351c4de73b126e561154cb7df4cc.tar.gz
Remove macro hacks for internal vs. external functions. Part 2 and last.
* src/visibility.h: Remove remaining define/undef hacks for symbol visibility. Add macros to detect the use of the public functions. Change all affected functions by replacing them by the x-macros. * src/g10lib.h: Add internal prototypes. (xtrymalloc, xtrycalloc, xtrymalloc_secure, xtrycalloc_secure) (xtryrealloc, xtrystrdup, xmalloc, xcalloc, xmalloc_secure) (xcalloc_secure, xrealloc, xstrdup, xfree): New macros. -- The use of xmalloc/xtrymalloc/xfree is a more common pattern than the gcry_free etc. functions. Those functions behave like those defined by C and thus for better readability we use these macros and not the underscore prefixed functions. Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'mpi/mpi-mpow.c')
-rw-r--r--mpi/mpi-mpow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mpi/mpi-mpow.c b/mpi/mpi-mpow.c
index 2a9a86b0..43bd641f 100644
--- a/mpi/mpi-mpow.c
+++ b/mpi/mpi-mpow.c
@@ -89,7 +89,7 @@ _gcry_mpi_mulpowm( gcry_mpi_t res, gcry_mpi_t *basearray, gcry_mpi_t *exparray,
gcry_assert (t);
gcry_assert (k < 10);
- G = gcry_xcalloc( (1<<k) , sizeof *G );
+ G = xcalloc( (1<<k) , sizeof *G );
#ifdef USE_BARRETT
barrett_y = init_barrett( m, &barrett_k, &barrett_r1, &barrett_r2 );
#endif
@@ -130,7 +130,7 @@ _gcry_mpi_mulpowm( gcry_mpi_t res, gcry_mpi_t *basearray, gcry_mpi_t *exparray,
#endif
for(i=0; i < (1<<k); i++ )
mpi_free(G[i]);
- gcry_free(G);
+ xfree(G);
}