From 6a22a9c16907fe66b466b4d273b7fb887a45d1fc Mon Sep 17 00:00:00 2001 From: Stefan Weil Date: Wed, 23 Feb 2011 19:40:14 +0100 Subject: 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 Signed-off-by: Blue Swirl --- tftp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tftp.h') diff --git a/tftp.h b/tftp.h index 2663d1c..3412e81 100644 --- a/tftp.h +++ b/tftp.h @@ -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; }; -- cgit v1.1