mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-06 05:00:15 +01:00
keyfile: trivial code simplification
This commit is contained in:
parent
d654836c6f
commit
f1d0293517
1 changed files with 1 additions and 3 deletions
|
|
@ -700,7 +700,6 @@ nm_keyfile_plugin_write_connection (NMConnection *connection,
|
|||
gsize len;
|
||||
gboolean success = FALSE;
|
||||
char *filename, *path;
|
||||
int err;
|
||||
const char *id;
|
||||
|
||||
if (out_path)
|
||||
|
|
@ -730,8 +729,7 @@ nm_keyfile_plugin_write_connection (NMConnection *connection,
|
|||
path, errno);
|
||||
unlink (path);
|
||||
} else {
|
||||
err = chmod (path, S_IRUSR | S_IWUSR);
|
||||
if (err) {
|
||||
if (chmod (path, S_IRUSR | S_IWUSR) < 0) {
|
||||
g_set_error (error, KEYFILE_PLUGIN_ERROR, 0,
|
||||
"%s.%d: error setting permissions on '%s': %d", __FILE__,
|
||||
__LINE__, path, errno);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue