mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-07 16:13:38 +08:00
Fix compiling on MS VS 2022 (64-Bit) without type conversion warnings
This commit is contained in:
@@ -85,11 +85,11 @@ tftp_close(void* handle)
|
||||
static int
|
||||
tftp_read(void* handle, void* buf, int bytes)
|
||||
{
|
||||
int ret = fread(buf, 1, bytes, (FILE*)handle);
|
||||
if (ret <= 0) {
|
||||
size_t ret = fread(buf, 1, bytes, (FILE*)handle);
|
||||
if ((ret == 0) || (ret > INT_MAX)) {
|
||||
return -1;
|
||||
}
|
||||
return ret;
|
||||
return (int)ret;
|
||||
}
|
||||
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user