forked from enlightenment/terminology
test return of ty_sb_add(). Closes CID1408482
This commit is contained in:
parent
b76bbbe455
commit
a782ce61e2
|
@ -414,9 +414,21 @@ termio_internal_get_selection(Termio *sd, size_t *lenp)
|
||||||
|
|
||||||
if (isb.len)
|
if (isb.len)
|
||||||
{
|
{
|
||||||
|
int res;
|
||||||
if (isb.buf[isb.len - 1] != '\n' && i != end_y)
|
if (isb.buf[isb.len - 1] != '\n' && i != end_y)
|
||||||
ty_sb_add(&isb, "\n", 1);
|
{
|
||||||
ty_sb_add(&sb, isb.buf, isb.len);
|
res = ty_sb_add(&isb, "\n", 1);
|
||||||
|
if (res < 0)
|
||||||
|
{
|
||||||
|
ERR("failure to add newline to selection buffer");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
res = ty_sb_add(&sb, isb.buf, isb.len);
|
||||||
|
if (res < 0)
|
||||||
|
{
|
||||||
|
ERR("failure to add %zd characters to selection buffer",
|
||||||
|
isb.len);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ty_sb_free(&isb);
|
ty_sb_free(&isb);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1305,11 +1305,19 @@ termpty_write(Termpty *ty, const char *input, int len)
|
||||||
#if defined(ENABLE_FUZZING)
|
#if defined(ENABLE_FUZZING)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
ty_sb_add(&ty->write_buffer, input, len);
|
int res = ty_sb_add(&ty->write_buffer, input, len);
|
||||||
ecore_main_fd_handler_active_set(ty->hand_fd,
|
|
||||||
ECORE_FD_ERROR |
|
if (res < 0)
|
||||||
ECORE_FD_READ |
|
{
|
||||||
ECORE_FD_WRITE);
|
ERR("failure to add %d characters to write buffer", len);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ecore_main_fd_handler_active_set(ty->hand_fd,
|
||||||
|
ECORE_FD_ERROR |
|
||||||
|
ECORE_FD_READ |
|
||||||
|
ECORE_FD_WRITE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct screen_info
|
struct screen_info
|
||||||
|
|
Loading…
Reference in New Issue