diff options
author | Alessandro Bono <alessandro.bono369@gmail.com> | 2022-09-29 11:26:45 +0200 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2022-10-27 19:28:33 +0000 |
commit | 3a8e7d2eb063f9604c11d52a4c0bed67eb5d8205 (patch) | |
tree | 9f2b4fe59bd3554ff038b274ce10d96d1b43fb03 | |
parent | a5cb3677cff6d2e1246dbc13962ca9e788c6338b (diff) | |
download | gdm-3a8e7d2eb063f9604c11d52a4c0bed67eb5d8205.tar.gz |
gdm-display: Simplify code
Just pass the error we received from the caller. While this doesn't
change much, it avoids a scan-build warning:
../daemon/gdm-display.c:213:73: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference]
g_critical ("could not create display access file: %s", error->message);
^~~~~~~~~~~~~~
-rw-r--r-- | daemon/gdm-display.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/daemon/gdm-display.c b/daemon/gdm-display.c index 837e3f95..42762fd8 100644 --- a/daemon/gdm-display.c +++ b/daemon/gdm-display.c @@ -178,13 +178,9 @@ _create_access_file_for_user (GdmDisplay *self, GError **error) { GdmDisplayAccessFile *access_file; - GError *file_error; access_file = gdm_display_access_file_new (username); - - file_error = NULL; - if (!gdm_display_access_file_open (access_file, &file_error)) { - g_propagate_error (error, file_error); + if (!gdm_display_access_file_open (access_file, error)) { return NULL; } |