diff --git a/source/bforce/prot_binkp.c b/source/bforce/prot_binkp.c index 75b0d2f..7c623f8 100644 --- a/source/bforce/prot_binkp.c +++ b/source/bforce/prot_binkp.c @@ -95,12 +95,12 @@ int binkp_loop(s_binkp_state *bstate) { bstate->emptyloop = 0; bstate->continuesend = false; - unsigned short read_pos=0; - unsigned short read_blklen=0; - unsigned short want_read=BINKP_HEADER; + uint16_t read_pos=0; + uint16_t read_blklen=0; + uint16_t want_read=BINKP_HEADER; - unsigned short write_pos=0; - unsigned short have_to_write=0; + uint16_t write_pos=0; + uint16_t have_to_write=0; int n, m; bool no_more_to_send = false; @@ -217,7 +217,7 @@ int binkp_loop(s_binkp_state *bstate) { if (read_pos == BINKP_HEADER) { // have read header, want read body DEB((D_24554, "it should be 0: %d", want_read)); - want_read = ((unsigned short)(readbuf[0]&0x7F)<<8) | readbuf[1]; + want_read = ((uint16_t)(readbuf[0]&0x7F)<<8) | (uint16_t)readbuf[1]; DEB((D_24554, "got block header, block length %u", want_read)); } // no else here: if want_read may be zero here for zero length block } diff --git a/source/bforce/sess_call.c b/source/bforce/sess_call.c index 268a805..675ba82 100644 --- a/source/bforce/sess_call.c +++ b/source/bforce/sess_call.c @@ -481,7 +481,7 @@ int call_system_tcpip(int callwith) // only TCPIP values char abuf[BF_MAXADDRSTR+1]; int rc = BFERR_NOERROR; char * pbuf; - char * target; + char * target = 0; int resflg; /* * Set verbal line name to "tcpip" value @@ -542,6 +542,7 @@ defalt: { target = strchr(p, ','); if ( target ) target[0] = '\0'; + target = 0; target = strrchr(p, ':'); if ( target ) { target++;