diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-12 13:12:15 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2013-11-27 11:41:42 +0100 |
commit | adc50de0b04a4d1f75af1b0a184f3a4155c9066d (patch) | |
tree | 9c79335b81aa8c2747099dae5d28c609b5036c36 /lib/gnutls_mpi.h | |
parent | 21d4cd5acdc6dc88b339724f484cec1521c8be46 (diff) | |
download | gnutls-adc50de0b04a4d1f75af1b0a184f3a4155c9066d.tar.gz |
Simplified _gnutls_mpi_release()
Diffstat (limited to 'lib/gnutls_mpi.h')
-rw-r--r-- | lib/gnutls_mpi.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/gnutls_mpi.h b/lib/gnutls_mpi.h index 3134243252..6011911064 100644 --- a/lib/gnutls_mpi.h +++ b/lib/gnutls_mpi.h @@ -59,7 +59,15 @@ bigint_t _gnutls_mpi_randomize(bigint_t, unsigned int bits, #define _gnutls_mpi_print_pgp(x,y,z) _gnutls_mpi_ops.bigint_print(x,y,z,GNUTLS_MPI_FORMAT_PGP) #define _gnutls_mpi_copy( a) _gnutls_mpi_set( NULL, a) -void _gnutls_mpi_release(bigint_t * x); +inline static +void _gnutls_mpi_release(bigint_t * x) +{ + if (*x == NULL) + return; + + _gnutls_mpi_ops.bigint_release(*x); + *x = NULL; +} int _gnutls_mpi_scan(bigint_t * ret_mpi, const void *buffer, size_t nbytes); |