1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

exec_on_slave_terminal(): reduce indentation level and use fmem_alloc()

instead of mem_alloc().
This commit is contained in:
Laurent MONIN 2006-01-07 01:49:12 +01:00 committed by Laurent MONIN
parent a2b9d8bb78
commit b09d2c7a3f

View File

@ -256,16 +256,16 @@ exec_on_slave_terminal( struct terminal *term,
int fg)
{
int data_size = plen + dlen + 1 /* 0 */ + 1 /* fg */ + 2 /* 2 null char */;
unsigned char *data = mem_alloc(data_size);
unsigned char *data = fmem_alloc(data_size);
if (data) {
data[0] = 0;
data[1] = fg;
memcpy(data + 2, path, plen + 1);
memcpy(data + 2 + plen + 1, delete, dlen + 1);
hard_write(term->fdout, data, data_size);
mem_free(data);
}
if (!data) return;
data[0] = 0;
data[1] = fg;
memcpy(data + 2, path, plen + 1);
memcpy(data + 2 + plen + 1, delete, dlen + 1);
hard_write(term->fdout, data, data_size);
fmem_free(data);
}
void