From 414945e29912b47e44a121239501f88569fa0e38 Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 30 Aug 2022 09:38:01 +0200 Subject: 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 Link: https://lore.barebox.org/20220830073816.2694734-7-enrico.scholz@sigma-chemnitz.de Signed-off-by: Sascha Hauer --- fs/tftp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'fs') 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) -- cgit v1.2.1