diff options
author | Enrico Scholz <enrico.scholz@sigma-chemnitz.de> | 2022-08-30 09:38:01 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2022-08-31 08:31:21 +0200 |
commit | 414945e29912b47e44a121239501f88569fa0e38 (patch) | |
tree | af98bd7467c90ac575a240ed7c479b102f444081 | |
parent | 31d0e29568031d087b4684f875cac09b878ae8ae (diff) | |
download | barebox-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.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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) |