From 926f4e1473ca7ee4a5f786fcd20cce52afb7a955 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Mon, 1 Dec 2014 12:17:39 -0500 Subject: [PATCH] libnm: drop nm_utils_deinit() It was a no-op anyway. --- libnm-core/crypto.h | 2 -- libnm-core/crypto_gnutls.c | 5 ----- libnm-core/crypto_nss.c | 5 ----- libnm-core/nm-utils.c | 23 ++--------------------- libnm-core/nm-utils.h | 3 +-- libnm-core/tests/test-crypto.c | 2 -- libnm/libnm.ver | 1 - 7 files changed, 3 insertions(+), 38 deletions(-) diff --git a/libnm-core/crypto.h b/libnm-core/crypto.h index b7b7dc4ae7..e98f31d923 100644 --- a/libnm-core/crypto.h +++ b/libnm-core/crypto.h @@ -46,8 +46,6 @@ typedef enum { gboolean crypto_init (GError **error); -void crypto_deinit (void); - GByteArray *crypto_decrypt_openssl_private_key_data (const guint8 *data, gsize data_len, const char *password, diff --git a/libnm-core/crypto_gnutls.c b/libnm-core/crypto_gnutls.c index e123830d2c..dab06debd7 100644 --- a/libnm-core/crypto_gnutls.c +++ b/libnm-core/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-core/crypto_nss.c b/libnm-core/crypto_nss.c index e7cf2eb030..6ab935c3a2 100644 --- a/libnm-core/crypto_nss.c +++ b/libnm-core/crypto_nss.c @@ -72,11 +72,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-core/nm-utils.c b/libnm-core/nm-utils.c index f1f5a9e8ca..f3187b6f01 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -210,7 +210,7 @@ get_encodings_for_lang (const char *lang, return success; } -/* init, deinit for libnm_util */ +/* init libnm */ static void __attribute__((constructor)) _check_symbols (void) @@ -231,9 +231,7 @@ static gboolean initialized = FALSE; * @error: location to store error, or %NULL * * Initializes libnm; should be called when starting and program that - * uses libnm. Sets up an atexit() handler to ensure de-initialization - * is performed, but calling nm_utils_deinit() to explicitly deinitialize - * libnm can also be done. This function can be called more than once. + * uses libnm. This function can be called more than once. * * Returns: %TRUE if the initialization was successful, %FALSE on failure. **/ @@ -254,23 +252,6 @@ nm_utils_init (GError **error) return TRUE; } -/** - * nm_utils_deinit: - * - * Frees all resources used internally by libnm. 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. - **/ -void -nm_utils_deinit (void) -{ - if (initialized) { - crypto_deinit (); - initialized = FALSE; - } -} - gboolean _nm_utils_is_manager_process; /* ssid helpers */ diff --git a/libnm-core/nm-utils.h b/libnm-core/nm-utils.h index dcfae00e09..013e26ca4e 100644 --- a/libnm-core/nm-utils.h +++ b/libnm-core/nm-utils.h @@ -39,9 +39,8 @@ G_BEGIN_DECLS -/* init, deinit nm_utils */ +/* init libnm */ gboolean nm_utils_init (GError **error); -void nm_utils_deinit (void); /* SSID helpers */ gboolean nm_utils_is_empty_ssid (const guint8 *ssid, gsize len); diff --git a/libnm-core/tests/test-crypto.c b/libnm-core/tests/test-crypto.c index b9e958d7b8..2fab2fec69 100644 --- a/libnm-core/tests/test-crypto.c +++ b/libnm-core/tests/test-crypto.c @@ -462,8 +462,6 @@ main (int argc, char **argv) ret = g_test_run (); - crypto_deinit (); - return ret; } diff --git a/libnm/libnm.ver b/libnm/libnm.ver index d81a24c7eb..6dab82052a 100644 --- a/libnm/libnm.ver +++ b/libnm/libnm.ver @@ -755,7 +755,6 @@ global: nm_utils_ap_mode_security_valid; nm_utils_bin2hexstr; nm_utils_check_virtual_device_compatibility; - nm_utils_deinit; nm_utils_escape_ssid; nm_utils_file_is_certificate; nm_utils_file_is_pkcs12;