diff options
author | Dan Winship <danw@redhat.com> | 2014-12-02 09:26:39 -0500 |
---|---|---|
committer | Dan Winship <danw@redhat.com> | 2014-12-04 08:39:54 -0500 |
commit | 539fac8b675e6a9e5bbb5374e32e3d7615fcf0b7 (patch) | |
tree | cb058e016fd51031df0a527a493eb7ea64f8c605 /libnm-util | |
parent | 926f4e1473ca7ee4a5f786fcd20cce52afb7a955 (diff) | |
download | NetworkManager-539fac8b675e6a9e5bbb5374e32e3d7615fcf0b7.tar.gz |
libnm-util: Note that nm_utils_deinit() is a no-op
nm_utils_deinit() is a no-op, so don't suggest that people need to
call it.
Diffstat (limited to 'libnm-util')
-rw-r--r-- | libnm-util/crypto.h | 2 | ||||
-rw-r--r-- | libnm-util/crypto_gnutls.c | 5 | ||||
-rw-r--r-- | libnm-util/crypto_nss.c | 5 | ||||
-rw-r--r-- | libnm-util/nm-utils.c | 16 | ||||
-rw-r--r-- | libnm-util/tests/test-crypto.c | 7 |
5 files changed, 5 insertions, 30 deletions
diff --git a/libnm-util/crypto.h b/libnm-util/crypto.h index edb79007f1..315d8fec83 100644 --- a/libnm-util/crypto.h +++ b/libnm-util/crypto.h @@ -70,8 +70,6 @@ GQuark _nm_crypto_error_quark (void); gboolean crypto_init (GError **error); -void crypto_deinit (void); - GByteArray *crypto_decrypt_private_key_data (const GByteArray *contents, const char *password, NMCryptoKeyType *out_key_type, diff --git a/libnm-util/crypto_gnutls.c b/libnm-util/crypto_gnutls.c index 03cb1b4761..3bec24ad67 100644 --- a/libnm-util/crypto_gnutls.c +++ b/libnm-util/crypto_gnutls.c @@ -56,11 +56,6 @@ crypto_init (GError **error) return TRUE; } -void -crypto_deinit (void) -{ -} - gboolean crypto_md5_hash (const char *salt, const gsize salt_len, diff --git a/libnm-util/crypto_nss.c b/libnm-util/crypto_nss.c index 52ee261d4a..edd19b54fe 100644 --- a/libnm-util/crypto_nss.c +++ b/libnm-util/crypto_nss.c @@ -71,11 +71,6 @@ crypto_init (GError **error) return TRUE; } -void -crypto_deinit (void) -{ -} - gboolean crypto_md5_hash (const char *salt, const gsize salt_len, diff --git a/libnm-util/nm-utils.c b/libnm-util/nm-utils.c index 371bb49ca8..9735394275 100644 --- a/libnm-util/nm-utils.c +++ b/libnm-util/nm-utils.c @@ -222,10 +222,8 @@ static gboolean initialized = FALSE; * nm_utils_init: * @error: location to store error, or %NULL * - * Initializes libnm-util; should be called when starting and program that - * uses libnm-util. Sets up an atexit() handler to ensure de-initialization - * is performed, but calling nm_utils_deinit() to explicitly deinitialize - * libnm-util can also be done. This function can be called more than once. + * Initializes libnm-util; should be called when starting any program that + * uses libnm-util. This function can be called more than once. * * Returns: %TRUE if the initialization was successful, %FALSE on failure. **/ @@ -249,18 +247,12 @@ nm_utils_init (GError **error) /** * nm_utils_deinit: * - * Frees all resources used internally by libnm-util. This function is called - * from an atexit() handler, set up by nm_utils_init(), but is safe to be called - * more than once. Subsequent calls have no effect until nm_utils_init() is - * called again. + * No-op. Although this function still exists for ABI compatibility reasons, it + * does not have any effect, and does not ever need to be called. **/ void nm_utils_deinit (void) { - if (initialized) { - crypto_deinit (); - initialized = FALSE; - } } /* ssid helpers */ diff --git a/libnm-util/tests/test-crypto.c b/libnm-util/tests/test-crypto.c index 9be9f2ae56..4bf2b3be74 100644 --- a/libnm-util/tests/test-crypto.c +++ b/libnm-util/tests/test-crypto.c @@ -412,7 +412,6 @@ int main (int argc, char **argv) { GError *error = NULL; - int ret; nmtst_init (&argc, &argv, TRUE); @@ -462,10 +461,6 @@ main (int argc, char **argv) "pkcs8-enc-key.pem, 1234567890", test_pkcs8); - ret = g_test_run (); - - crypto_deinit (); - - return ret; + return g_test_run (); } |