mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-01 07:15:32 -04:00
selection: initialize 'ctx' before jumping into its scope
This commit is contained in:
parent
b15032d223
commit
dd57418494
1 changed files with 2 additions and 2 deletions
|
|
@ -328,11 +328,11 @@ struct clipboard_send {
|
||||||
static bool
|
static bool
|
||||||
fdm_send(struct fdm *fdm, int fd, int events, void *data)
|
fdm_send(struct fdm *fdm, int fd, int events, void *data)
|
||||||
{
|
{
|
||||||
|
struct clipboard_send *ctx = data;
|
||||||
|
|
||||||
if (events & EPOLLHUP)
|
if (events & EPOLLHUP)
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
struct clipboard_send *ctx = data;
|
|
||||||
|
|
||||||
switch (async_write(fd, ctx->data, ctx->len, &ctx->idx)) {
|
switch (async_write(fd, ctx->data, ctx->len, &ctx->idx)) {
|
||||||
case ASYNC_WRITE_REMAIN:
|
case ASYNC_WRITE_REMAIN:
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue