selection: initialize 'ctx' before jumping into its scope

This commit is contained in:
Daniel Eklöf 2019-11-05 08:51:10 +01:00
parent b15032d223
commit dd57418494
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -328,11 +328,11 @@ struct clipboard_send {
static bool
fdm_send(struct fdm *fdm, int fd, int events, void *data)
{
struct clipboard_send *ctx = data;
if (events & EPOLLHUP)
goto done;
struct clipboard_send *ctx = data;
switch (async_write(fd, ctx->data, ctx->len, &ctx->idx)) {
case ASYNC_WRITE_REMAIN:
return true;