Replace int -> uint to avoid signed integer overflow

An example of such an error (should be compiled with DEBUG_SANITIZE):

runtime error: left shift of 1 by 31 places cannot be represented in
type 'int'

Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Rostislav Skudnov
2017-02-01 18:35:13 +00:00
committed by Denys Vlasenko
parent c31b54fd81
commit 8762512fdb
5 changed files with 8 additions and 8 deletions

View File

@@ -94,7 +94,7 @@ static int receive(/*int read_fd, */int file_fd)
int blockBegin;
int blockNo, blockNoOnesCompl;
int cksum_or_crc;
int expected;
unsigned expected;
int i, j;
blockBegin = read_byte(timeout);