diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2022-08-30 09:38:12 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-09-12 12:09:21 +0200 |
commit | 46ff23b4468dabf5cec3ca6db1bad8dab4818943 (patch) | |
tree | 39a078c18ad83f60e1b36b8aeac411d82af4968c | |
parent | 320ce55adcb6bc2c426ec98bd7e97bcbd6873ce1 (diff) | |
download | barebox-46ff23b4468dabf5cec3ca6db1bad8dab4818943.tar.gz |
tftp: do not use 'priv->block' for RRQ
attribute is not used outside tftp_recv() for RRQ.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Link: https://lore.barebox.org/20220830073816.2694734-18-enrico.scholz@sigma-chemnitz.de
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r-- | fs/tftp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -429,7 +429,7 @@ static void tftp_recv(struct file_priv *priv, case TFTP_DATA: len -= 2; - priv->block = ntohs(*(uint16_t *)pkt); + block = ntohs(*(uint16_t *)pkt); if (priv->state == STATE_RRQ) { /* first block received; entered only with non rfc @@ -444,11 +444,11 @@ static void tftp_recv(struct file_priv *priv, break; } - if (priv->block != (uint16_t)(priv->last_block + 1)) + if (block != (uint16_t)(priv->last_block + 1)) break; tftp_timer_reset(priv); - tftp_put_data(priv, priv->block, pkt + 2, len); + tftp_put_data(priv, block, pkt + 2, len); break; |