rem: sent = tcp_send(upload->con, buf, MIN(remains, read));  if (sent <= 0) {
add: if ((sent = tcp_send(upload->con, buf, MIN(remains, read))) <= 0) {
context: static void on_upload_write(int fd, input_id input, void *udata){	OpnUpload *upload = (OpnUpload *) udata;	uint8_t buf[RW_BUFFER];	size_t size = sizeof(buf), read, sent;	off_t remains;#if 0	if (!(size = upload_throttle(transfer->chunk, sizeof(buf))))		return;#endif	remains = upload->chunk->stop -	          (upload->chunk->start + upload->chunk->transmit);	if (remains <= 0) {		tcp_close(upload->con);		OPN->chunk_write(OPN, upload->transfer, upload->chunk,		                 upload->chunk->source, NULL, 0);		return;	}	if (!(read = fread(buf, 1, size, upload->fp))) {		tcp_close(upload->con);		return;	}	sent = tcp_send(upload->con, buf, MIN(remains, read));	if (sent <= 0) {		tcp_close(upload->con);		return;	}	OPN->chunk_write(OPN, upload->transfer, upload->chunk,	                 upload->chunk->source, buf, sent);}