[mutter/wayland] xwayland: Use %m instead of manual strerror(errno)



commit 81d033ec738c3e8b9c1153b533bd2f8a896158d7
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Apr 1 19:57:55 2014 -0400

    xwayland: Use %m instead of manual strerror(errno)

 src/wayland/meta-xwayland.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index d261ca7..aa4b24d 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -204,8 +204,7 @@ bind_to_abstract_socket (int display)
   size = offsetof (struct sockaddr_un, sun_path) + name_size;
   if (bind (fd, (struct sockaddr *) &addr, size) < 0)
     {
-      g_warning ("failed to bind to @%s: %s\n",
-                 addr.sun_path + 1, strerror (errno));
+      g_warning ("failed to bind to @%s: %m", addr.sun_path + 1);
       close (fd);
       return -1;
     }
@@ -237,8 +236,7 @@ bind_to_unix_socket (int display)
   unlink (addr.sun_path);
   if (bind (fd, (struct sockaddr *) &addr, size) < 0)
     {
-      char *msg = strerror (errno);
-      g_warning ("failed to bind to %s (%s)\n", addr.sun_path, msg);
+      g_warning ("failed to bind to %s: %m\n", addr.sun_path);
       close (fd);
       return -1;
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]