diff options
Diffstat (limited to 'xwayland/launcher.c')
-rw-r--r-- | xwayland/launcher.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xwayland/launcher.c b/xwayland/launcher.c index f0a87f5b..70703a4b 100644 --- a/xwayland/launcher.c +++ b/xwayland/launcher.c @@ -213,8 +213,7 @@ bind_to_abstract_socket(int display) "%c/tmp/.X11-unix/X%d", 0, display); size = offsetof(struct sockaddr_un, sun_path) + name_size; if (bind(fd, (struct sockaddr *) &addr, size) < 0) { - weston_log("failed to bind to @%s: %s\n", - addr.sun_path + 1, strerror(errno)); + weston_log("failed to bind to @%s: %m\n", addr.sun_path + 1); close(fd); return -1; } @@ -244,8 +243,7 @@ bind_to_unix_socket(int display) size = offsetof(struct sockaddr_un, sun_path) + name_size; unlink(addr.sun_path); if (bind(fd, (struct sockaddr *) &addr, size) < 0) { - weston_log("failed to bind to %s (%s)\n", - addr.sun_path, strerror(errno)); + weston_log("failed to bind to %s: %m\n", addr.sun_path); close(fd); return -1; } @@ -350,6 +348,8 @@ module_init(struct weston_compositor *compositor, char lockfile[256], display_name[8]; wxs = zalloc(sizeof *wxs); + if (wxs == NULL) + return -1; wxs->process.cleanup = weston_xserver_cleanup; wxs->wl_display = display; wxs->compositor = compositor; |