static int send_file(int fd, const char *fname, const char *cmd)
{
+ unsigned char blocks_b;
char buf[0x10000];
int retval = -1;
FILE *f = NULL;
blocksz = sizeof(buf);
blocks = (size + blocksz - 1) / blocksz;
+ blocks_b = blocks;
send_cmd(fd, cmd);
- ret = write_with_check(fd, &blocks, 1, 'k');
+ ret = write_with_check(fd, &blocks_b, 1, 'k');
if (ret)
return ret;