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:
@@ -2403,8 +2403,8 @@ nm_utils_file_is_private_key (const char *filename, gboolean *out_encrypted)
|
||||
const char *extensions[] = { ".der", ".pem", ".p12", ".key", NULL };
|
||||
|
||||
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))
|
||||
return FALSE;
|
||||
|
||||
|
Reference in New Issue
Block a user