diff options
| author | Kristian Høgsberg <krh@bitplanet.net> | 2010-12-01 10:21:15 -0500 |
|---|---|---|
| committer | Kristian Høgsberg <krh@bitplanet.net> | 2010-12-01 10:21:15 -0500 |
| commit | 0611e3efc2e79e2df61f0225ebd47ef8f7b27c12 (patch) | |
| tree | 17311d5c7d8c05672fee13f22730e5f2284297e2 | |
| parent | Move pointer and keyboard focus tracking into libwayland-server (diff) | |
| download | wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.tar wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.tar.gz wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.tar.bz2 wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.tar.lz wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.tar.xz wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.tar.zst wayland-0611e3efc2e79e2df61f0225ebd47ef8f7b27c12.zip | |
Indentation nit-picking
| -rw-r--r-- | compositor/compositor-wayland.c | 6 | ||||
| -rw-r--r-- | compositor/compositor.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compositor/compositor-wayland.c b/compositor/compositor-wayland.c index c64944c..98c675b 100644 --- a/compositor/compositor-wayland.c +++ b/compositor/compositor-wayland.c @@ -513,7 +513,7 @@ wayland_compositor_create(struct wl_display *display, int width, int height) struct wayland_compositor *c; struct wl_event_loop *loop; int fd; - char *socket_name; + char *socket_name, *env; int socket_name_size; c = malloc(sizeof *c); @@ -522,8 +522,8 @@ wayland_compositor_create(struct wl_display *display, int width, int height) memset(c, 0, sizeof *c); - socket_name_size = 1 + asprintf(&socket_name, "%c%s", '\0', - getenv("WAYLAND_DISPLAY")); + env = getenv("WAYLAND_DISPLAY"); + socket_name_size = asprintf(&socket_name, "%c%s", '\0', env) + 1; c->parent.display = wl_display_connect(socket_name, socket_name_size); free(socket_name); diff --git a/compositor/compositor.c b/compositor/compositor.c index 23a496f..ad5b8a7 100644 --- a/compositor/compositor.c +++ b/compositor/compositor.c @@ -1435,8 +1435,8 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - socket_name_size = 1 + asprintf(&socket_name, "%c%s", '\0', - option_socket_name); + socket_name_size = + asprintf(&socket_name, "%c%s", '\0', option_socket_name) + 1; if (wl_display_add_socket(display, socket_name, socket_name_size)) { fprintf(stderr, "failed to add socket: %m\n"); |
