keyfile,config: use nm_keyfile_error_is_not_found() helper

This commit is contained in:
Thomas Haller 2020-05-05 08:27:07 +02:00
parent df27164d5e
commit e08bb66b34
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -1622,9 +1622,7 @@ parity_good:
out_err:
if (!err)
return;
if ( err->domain == G_KEY_FILE_ERROR
&& NM_IN_SET (err->code, G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
if (nm_keyfile_error_is_not_found (err)) {
/* ignore such errors. The key is not present. */
return;
}
@ -3154,9 +3152,7 @@ read_one_setting_value (KeyfileReaderInfo *info,
g_return_if_reached ();
if (err) {
if ( err->domain == G_KEY_FILE_ERROR
&& NM_IN_SET (err->code, G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
G_KEY_FILE_ERROR_KEY_NOT_FOUND)) {
if (nm_keyfile_error_is_not_found (err)) {
/* ignore such errors. The key is not present. */
} else {
handle_warn (info, key, NM_KEYFILE_WARN_SEVERITY_WARN,