diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-02 20:55:18 +0000 |
commit | 78c0815c4118fe24ab78cce2dc48a6232dcd824a (patch) | |
tree | 8512c50df70b8dd80c919e88ade3419207c95956 /plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c | |
parent | ce816d83a8c75808e0eb06832592bffefe4a8dc4 (diff) |
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c')
-rw-r--r-- | plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c index 4dc5211360..dcff1e8a0a 100644 --- a/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c +++ b/plugins/MirOTR/libgcrypt-1.4.6/mpi/mpiutil.c @@ -211,7 +211,7 @@ gcry_mpi_set_opaque( gcry_mpi_t a, void *p, unsigned int nbits ) if (!a) a = mpi_alloc(0); - if( a->flags & 4 ) + if ( a->flags & 4 ) gcry_free( a->d ); else _gcry_mpi_free_limb_space (a->d, a->alloced); @@ -228,9 +228,9 @@ gcry_mpi_set_opaque( gcry_mpi_t a, void *p, unsigned int nbits ) void * gcry_mpi_get_opaque( gcry_mpi_t a, unsigned int *nbits ) { - if( !(a->flags & 4) ) + if ( !(a->flags & 4) ) log_bug("mpi_get_opaque on normal mpi\n"); - if( nbits ) + if ( nbits ) *nbits = a->sign; return a->d; } @@ -246,13 +246,13 @@ gcry_mpi_copy( gcry_mpi_t a ) int i; gcry_mpi_t b; - if( a && (a->flags & 4) ) { + if ( a && (a->flags & 4) ) { void *p = gcry_is_secure(a->d)? gcry_xmalloc_secure( (a->sign+7)/8 ) : gcry_xmalloc( (a->sign+7)/8 ); memcpy( p, a->d, (a->sign+7)/8 ); b = gcry_mpi_set_opaque( NULL, p, a->sign ); } - else if( a ) { + else if ( a ) { b = mpi_is_secure(a)? mpi_alloc_secure( a->nlimbs ) : mpi_alloc( a->nlimbs ); b->nlimbs = a->nlimbs; @@ -277,14 +277,14 @@ _gcry_mpi_alloc_like( gcry_mpi_t a ) { gcry_mpi_t b; - if( a && (a->flags & 4) ) { + if ( a && (a->flags & 4) ) { int n = (a->sign+7)/8; void *p = gcry_is_secure(a->d)? gcry_malloc_secure( n ) : gcry_malloc( n ); memcpy( p, a->d, n ); b = gcry_mpi_set_opaque( NULL, p, a->sign ); } - else if( a ) { + else if ( a ) { b = mpi_is_secure(a)? mpi_alloc_secure( a->nlimbs ) : mpi_alloc( a->nlimbs ); b->nlimbs = 0; |