From 81d033ec738c3e8b9c1153b533bd2f8a896158d7 Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Tue, 1 Apr 2014 19:57:55 -0400 Subject: [PATCH] xwayland: Use %m instead of manual strerror(errno) --- src/wayland/meta-xwayland.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index d261ca712..aa4b24df5 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; }