Fix warnings of not type casting a ptr
This commit is contained in:
2023-11-12 14:39:34 +01:00
parent 34c0beb43d
commit 435212d807

View File

@@ -147,10 +147,10 @@ int tftp_read(void* handle, void* buf, int bytes) {
}
FILE* file = (FILE*)handle;
if (file == &virt_file[0]) {
ret = tftp_custom_fread(buf, bytes, file);
if ((tftp_custom_file_t*)file == &virt_file[0]) {
ret = tftp_custom_fread(buf, bytes, (tftp_custom_file_t*)file);
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");
return -1;
}