diff options
author | Marco Trevisan (TreviƱo) <mail@3v1n0.net> | 2021-02-16 01:03:41 +0100 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2021-02-22 21:08:43 +0000 |
commit | 9c1934df35011ec67fade089388ac7db4a2d8c74 (patch) | |
tree | abead06ac5b642d2b2ea7879dfafbe16c022b18f /common | |
parent | 64e12f3357437ebba062573d863bac8a3de5a62c (diff) | |
download | gdm-9c1934df35011ec67fade089388ac7db4a2d8c74.tar.gz |
cleanup: Use more literal errors
Replace g_set_error with g_set_error_literal where it makes sense.
Diffstat (limited to 'common')
-rw-r--r-- | common/gdm-common.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/common/gdm-common.c b/common/gdm-common.c index b8de7555..2e9114f2 100644 --- a/common/gdm-common.c +++ b/common/gdm-common.c @@ -257,10 +257,10 @@ _read_bytes (int fd, return FALSE; } else if (bytes_left_to_read > 0) { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - "%s", g_strerror (errno)); + g_set_error_literal (error, + G_FILE_ERROR, + g_file_error_from_errno (errno), + g_strerror (errno)); return FALSE; } @@ -292,10 +292,10 @@ gdm_generate_random_bytes (gsize size, fd = open ("/dev/urandom", O_RDONLY); if (fd < 0) { - g_set_error (error, - G_FILE_ERROR, - g_file_error_from_errno (errno), - "%s", g_strerror (errno)); + g_set_error_literal (error, + G_FILE_ERROR, + g_file_error_from_errno (errno), + g_strerror (errno)); close (fd); return NULL; } |