TFTP
Fix warnings of not type casting a ptr
This commit is contained in:
@@ -147,10 +147,10 @@ int tftp_read(void* handle, void* buf, int bytes) {
|
|||||||
}
|
}
|
||||||
FILE* file = (FILE*)handle;
|
FILE* file = (FILE*)handle;
|
||||||
|
|
||||||
if (file == &virt_file[0]) {
|
if ((tftp_custom_file_t*)file == &virt_file[0]) {
|
||||||
ret = tftp_custom_fread(buf, bytes, file);
|
ret = tftp_custom_fread(buf, bytes, (tftp_custom_file_t*)file);
|
||||||
return ret;
|
return ret;
|
||||||
} else if (file == &virt_file[1]) {
|
} else if ((tftp_custom_file_t*)file == &virt_file[1]) {
|
||||||
LOG_CRIT(TAG, "Exception: Trying to read a write only file");
|
LOG_CRIT(TAG, "Exception: Trying to read a write only file");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user