[mutter] xwayland: Use %m instead of explicit strerror
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] xwayland: Use %m instead of explicit strerror
- Date: Thu, 17 Apr 2014 20:23:51 +0000 (UTC)
commit 14deeef8a790a66db56c86a5c316956e658a8dd4
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Thu Apr 17 14:42:41 2014 -0400
xwayland: Use %m instead of explicit strerror
src/wayland/meta-xwayland.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 22a77b2..8eba0e7 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -142,8 +142,7 @@ create_lockfile (int display, int *display_out)
fd = open (filename, O_CLOEXEC, O_RDONLY);
if (fd < 0 || read (fd, pid, 11) != 11)
{
- const char *msg = strerror (errno);
- g_warning ("can't read lock file %s: %s", filename, msg);
+ g_warning ("can't read lock file %s: %m", filename);
g_free (filename);
/* ignore error and try the next display number */
@@ -167,8 +166,7 @@ create_lockfile (int display, int *display_out)
{
if (unlink (filename) < 0)
{
- const char *msg = strerror (errno);
- g_warning ("failed to unlink stale lock file: %s", msg);
+ g_warning ("failed to unlink stale lock file: %m");
display++;
}
g_free (filename);
@@ -181,8 +179,7 @@ create_lockfile (int display, int *display_out)
}
else if (fd < 0)
{
- const char *msg = strerror (errno);
- g_warning ("failed to create lock file %s: %s", filename , msg);
+ g_warning ("failed to create lock file %s: %m", filename);
g_free (filename);
return NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]