mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
slirp: Remove some type casts caused by bad declaration of x.tp_buf
x.tp_buf was declared as a uint8_t array, but always used as a char array (which needed a lot of type casts). The patch includes these changes: * Fix declaration of x.tp_buf and remove all type casts. * Use offsetof() to get the offset of x.tp_buf. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
c3febae62b
commit
89d2d3af51
2 changed files with 8 additions and 8 deletions
|
@ -26,7 +26,7 @@ struct tftp_t {
|
|||
uint16_t tp_error_code;
|
||||
uint8_t tp_msg[512];
|
||||
} tp_error;
|
||||
uint8_t tp_buf[512 + 2];
|
||||
char tp_buf[512 + 2];
|
||||
} x;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue