summaryrefslogtreecommitdiff
path: root/nuttx/netutils
diff options
context:
space:
mode:
Diffstat (limited to 'nuttx/netutils')
-rw-r--r--nuttx/netutils/tftpc/tftpc_get.c2
-rw-r--r--nuttx/netutils/tftpc/tftpc_put.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/nuttx/netutils/tftpc/tftpc_get.c b/nuttx/netutils/tftpc/tftpc_get.c
index bb2f96267..584664599 100644
--- a/nuttx/netutils/tftpc/tftpc_get.c
+++ b/nuttx/netutils/tftpc/tftpc_get.c
@@ -262,7 +262,7 @@ int tftpget(const char *remote, const char *local, in_addr_t addr, boolean binar
/* Parse the incoming DATA packet */
if (nbytesrecvd < TFTP_DATAHEADERSIZE ||
- tftp_parsedatapacket(packet, &opcode, &blockno) != OK ||
+ tftp_parsedatapacket(packet, &opcode, &rblockno) != OK ||
blockno != rblockno)
{
nvdbg("Parse failure\n");
diff --git a/nuttx/netutils/tftpc/tftpc_put.c b/nuttx/netutils/tftpc/tftpc_put.c
index 1d19a2d74..ca158a783 100644
--- a/nuttx/netutils/tftpc/tftpc_put.c
+++ b/nuttx/netutils/tftpc/tftpc_put.c
@@ -96,7 +96,7 @@ static inline int tftp_incrndx(int ndx)
static inline ssize_t tftp_read(int fd, ubyte *buf, size_t buflen)
{
ssize_t nbytesread;
- ssize_t totalread;
+ ssize_t totalread = 0;
while (totalread < buflen)
{