From: Werner Almesberger Date: Tue, 16 Apr 2013 16:55:24 +0000 (-0300) Subject: tftp.h, tftp.c (tftp_get): make "buffer" void and use unsigned char internally X-Git-Tag: 24jan2021_ls180~2978 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cdb5519272ab59462c570a32a811782d3e26068b;p=litex.git tftp.h, tftp.c (tftp_get): make "buffer" void and use unsigned char internally --- diff --git a/software/bios/tftp.c b/software/bios/tftp.c index ca50034a..8e255b0f 100644 --- a/software/bios/tftp.c +++ b/software/bios/tftp.c @@ -44,7 +44,7 @@ static int format_ack(unsigned char *buf, unsigned short block) static unsigned char *packet_data; static int total_length; static int transfer_finished; -static char *dst_buffer; +static unsigned char *dst_buffer; static void rx_callback(unsigned int src_ip, unsigned short src_port, unsigned short dst_port, void *_data, unsigned int length) @@ -78,7 +78,7 @@ static void rx_callback(unsigned int src_ip, unsigned short src_port, } } -int tftp_get(unsigned int ip, const char *filename, char *buffer) +int tftp_get(unsigned int ip, const char *filename, void *buffer) { int len; int tries; diff --git a/software/bios/tftp.h b/software/bios/tftp.h index b27fb50f..53a6cba6 100644 --- a/software/bios/tftp.h +++ b/software/bios/tftp.h @@ -1,7 +1,7 @@ #ifndef __TFTP_H #define __TFTP_H -int tftp_get(unsigned int ip, const char *filename, char *buffer); +int tftp_get(unsigned int ip, const char *filename, void *buffer); #endif /* __TFTP_H */