summaryrefslogtreecommitdiff
path: root/ratox.c
diff options
context:
space:
mode:
Diffstat (limited to 'ratox.c')
-rw-r--r--ratox.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ratox.c b/ratox.c
index 7626c98..0efedf5 100644
--- a/ratox.c
+++ b/ratox.c
@@ -117,7 +117,6 @@ enum { TRANSFER_NONE, TRANSFER_INITIATED, TRANSFER_PENDING, TRANSFER_INPROGRESS,
struct transfer {
uint32_t fnum;
uint8_t *buf;
- int chunksz;
ssize_t n;
int pendingbuf;
int state;
@@ -677,8 +676,7 @@ cbfilecontrol(Tox *m, uint32_t frnum, uint32_t fnum, TOX_FILE_CONTROL ctrltype,
f->tx.state = TRANSFER_INPROGRESS;
} else {
f->tx.fnum = fnum;
- f->tx.chunksz = TOX_MAX_CUSTOM_PACKET_SIZE;
- f->tx.buf = malloc(f->tx.chunksz);
+ f->tx.buf = malloc(TOX_MAX_CUSTOM_PACKET_SIZE);
if (!f->tx.buf)
eprintf("malloc:");
f->tx.n = 0;