aboutsummaryrefslogtreecommitdiff
path: root/tftp.h
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-02-23 19:40:14 +0100
committerBlue Swirl <blauwirbel@gmail.com>2011-02-25 15:58:59 +0000
commit6a22a9c16907fe66b466b4d273b7fb887a45d1fc (patch)
tree911f4314e13053dc5f1fd6359c817c926315a731 /tftp.h
parent1e0dd6b7f7a54afbe35f6cd028d864e8402be217 (diff)
downloadslirp-6a22a9c16907fe66b466b4d273b7fb887a45d1fc.zip
slirp-6a22a9c16907fe66b466b4d273b7fb887a45d1fc.tar.gz
slirp-6a22a9c16907fe66b466b4d273b7fb887a45d1fc.tar.bz2
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>
Diffstat (limited to 'tftp.h')
-rw-r--r--tftp.h2
1 files changed, 1 insertions, 1 deletions
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;
};