]> git.sur5r.net Git - u-boot/blobdiff - net/tftp.c
net: Use packed structures for networking
[u-boot] / net / tftp.c
index ced45ec1f1f4aa836670115a8be30bf2e507b291..61e1671068039f2be225e5a8b0af9164237fbaa9 100644 (file)
@@ -742,8 +742,8 @@ void tftp_start(enum proto_t protocol)
                        (net_ip.s_addr >> 16) & 0xFF,
                        (net_ip.s_addr >> 24) & 0xFF);
 
-               strncpy(tftp_filename, default_filename, MAX_LEN);
-               tftp_filename[MAX_LEN - 1] = 0;
+               strncpy(tftp_filename, default_filename, DEFAULT_NAME_LEN);
+               tftp_filename[DEFAULT_NAME_LEN - 1] = 0;
 
                printf("*** Warning: no boot file name; using '%s'\n",
                       tftp_filename);