tftp.h, tftp.c (tftp_get): make "buffer" void and use unsigned char internally
authorWerner Almesberger <werner@almesberger.net>
Tue, 16 Apr 2013 16:55:24 +0000 (13:55 -0300)
committerSebastien Bourdeauducq <sebastien@milkymist.org>
Tue, 16 Apr 2013 17:23:12 +0000 (19:23 +0200)
software/bios/tftp.c
software/bios/tftp.h

index ca50034ad654aaef9bcee0ccbdda2b1e3e5f1434..8e255b0f0a81539ee0660d917764713889827ab2 100644 (file)
@@ -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;
index b27fb50f7385b959d7f5cb3865e57c739bd3407f..53a6cba69d9f082878fe1e571029e5b832759963 100644 (file)
@@ -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 */