diff options
author | Drew DeVault <sir@cmpwn.com> | 2018-03-31 12:01:02 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2018-03-31 12:01:02 -0400 |
commit | 59f362196b84d6cf455b574d887ec3e0c3163eb3 (patch) | |
tree | bc2d9169010001d3f08126b384a1248942b9e4be /client/pool-buffer.c | |
parent | Merge pull request #1681 from emersion/xwayland-configure-position (diff) | |
download | sway-59f362196b84d6cf455b574d887ec3e0c3163eb3.tar.gz sway-59f362196b84d6cf455b574d887ec3e0c3163eb3.tar.zst sway-59f362196b84d6cf455b574d887ec3e0c3163eb3.zip |
assert(fd != -1);
Thanks @martinetd
Diffstat (limited to 'client/pool-buffer.c')
-rw-r--r-- | client/pool-buffer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/client/pool-buffer.c b/client/pool-buffer.c index 93cfcfc5..b5ed9c98 100644 --- a/client/pool-buffer.c +++ b/client/pool-buffer.c | |||
@@ -57,7 +57,7 @@ static struct pool_buffer *create_buffer(struct wl_shm *shm, | |||
57 | 57 | ||
58 | char *name; | 58 | char *name; |
59 | int fd = create_pool_file(size, &name); | 59 | int fd = create_pool_file(size, &name); |
60 | assert(fd); | 60 | assert(fd != -1); |
61 | void *data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); | 61 | void *data = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); |
62 | struct wl_shm_pool *pool = wl_shm_create_pool(shm, fd, size); | 62 | struct wl_shm_pool *pool = wl_shm_create_pool(shm, fd, size); |
63 | buf->buffer = wl_shm_pool_create_buffer(pool, 0, | 63 | buf->buffer = wl_shm_pool_create_buffer(pool, 0, |