summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEnrico Scholz <enrico.scholz@sigma-chemnitz.de>2022-08-30 09:38:01 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-08-31 08:31:21 +0200
commit414945e29912b47e44a121239501f88569fa0e38 (patch)
treeaf98bd7467c90ac575a240ed7c479b102f444081
parent31d0e29568031d087b4684f875cac09b878ae8ae (diff)
downloadbarebox-414945e29912b47e44a121239501f88569fa0e38.tar.gz
barebox-414945e29912b47e44a121239501f88569fa0e38.tar.xz
tftp: minor refactoring of RRQ/WRQ packet generation code
Having 11 printf arguments with lot of them being 0, makes it difficulty to read and extend. Add some comments and use '\0' for %c. Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de> Link: https://lore.barebox.org/20220830073816.2694734-7-enrico.scholz@sigma-chemnitz.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--fs/tftp.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/tftp.c b/fs/tftp.c
index c1a1937117..0b2a420b66 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -134,11 +134,11 @@ static int tftp_send(struct file_priv *priv)
"%d%c"
"blksize%c"
"1432",
- priv->filename + 1, 0,
- 0,
- 0,
- TIMEOUT, 0,
- 0);
+ priv->filename + 1, '\0',
+ '\0', /* "octet" */
+ '\0', /* "timeout" */
+ TIMEOUT, '\0',
+ '\0'); /* "blksize" */
pkt++;
if (!priv->push)