From ea4e8c806fb46f43d39977c4df0b8c200ad2cd9c Mon Sep 17 00:00:00 2001 From: Alexey Khromov Date: Sat, 22 Jun 2024 21:18:01 +0300 Subject: [PATCH] Fixes for binkp on aarch64 platform --- source/bforce/prot_binkp.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/bforce/prot_binkp.c b/source/bforce/prot_binkp.c index 694b0c3..0a9e84a 100644 --- a/source/bforce/prot_binkp.c +++ b/source/bforce/prot_binkp.c @@ -124,7 +124,7 @@ int binkp_loop(s_binkp_state *bstate) { bstate->continuesend = false; } - if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=-1)) { + if (have_to_write==0 && (!no_more_to_send || bstate->extracmd[0]!=(char)-1)) { m = binkp_getforsend(bstate, writebuf+BINKP_HEADER, &block_type, &block_length); if(m==1 || m==3) { //DEB((D_24554, "got block for sending %d %hu", block_type, block_length)); @@ -340,7 +340,7 @@ int binkp_getforsend(s_binkp_state *bstate, char *buf, int *block_type, unsigned { int my_sf, wr_pos; int n; // read file - if (bstate->extracmd[0]!=-1) { + if (bstate->extracmd[0]!=(char)-1) { DEB((D_24554, "Send cmd to remote %d %s", bstate->extracmd[0], bstate->extracmd+1)); buf[0] = bstate->extracmd[0]; strcpy(buf+1, bstate->extracmd+1); @@ -954,7 +954,7 @@ case BPMSG_GET: /* Get a file from offset */ } DEB((D_24554, "M_GET file %s size %d time %d offset %d", getfi.fn, getfi.sz, getfi.tm, getfi.offs)); - if (bstate->extracmd[0] != -1) return 0; + if (bstate->extracmd[0] != (char)-1) return 0; if (bstate->pi->send) if (p_compfinfo(bstate->pi->send, getfi.fn, getfi.sz, getfi.tm)==0) { DEB((D_24554, "M_GET for currently transmitted file")); @@ -1044,7 +1044,7 @@ case BINKP_BLK_DATA: return 1; } - if (bstate->extracmd[0] != -1) return 0; + if (bstate->extracmd[0] != (char)-1) return 0; long int n; n = p_rx_writefile(buf, block_length, bstate->pi);