libnm: don't require initialized @out_encrypted argument in nm_utils_file_is_private_key()

No need to require the caller to initialize the optional out-argument.
Otherwise we get:

  (nm-connection-editor:2471): libnm-CRITICAL **: nm_utils_file_is_private_key: assertion 'out_encrypted == NULL || *out_encrypted == FALSE' failed

https://bugzilla.gnome.org/show_bug.cgi?id=763578

Fixes: 1c4f41c610
This commit is contained in:
Thomas Haller
2016-05-13 14:19:59 +02:00
parent c094ee5f90
commit 81499355b0

View File

@@ -2403,8 +2403,8 @@ nm_utils_file_is_private_key (const char *filename, gboolean *out_encrypted)
const char *extensions[] = { ".der", ".pem", ".p12", ".key", NULL }; const char *extensions[] = { ".der", ".pem", ".p12", ".key", NULL };
g_return_val_if_fail (filename != NULL, FALSE); g_return_val_if_fail (filename != NULL, FALSE);
g_return_val_if_fail (out_encrypted == NULL || *out_encrypted == FALSE, FALSE);
NM_SET_OUT (out_encrypted, FALSE);
if (!file_has_extension (filename, extensions)) if (!file_has_extension (filename, extensions))
return FALSE; return FALSE;