[PATCH v3 06/18] tftp: minor refactoring of RRQ/WRQ packet generation code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
---
 fs/tftp.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/tftp.c b/fs/tftp.c
index 913ca1df6e42..7627f3f59669 100644
--- a/fs/tftp.c
+++ b/fs/tftp.c
@@ -136,13 +136,13 @@ static int tftp_send(struct file_priv *priv)
 				"%lld%c"
 				"blksize%c"
 				"1432",
-				priv->filename + 1, 0,
-				0,
-				0,
-				TIMEOUT, 0,
-				0,
-				priv->filesize, 0,
-				0);
+				priv->filename + 1, '\0',
+				'\0',	/* "octet" */
+				'\0',	/* "timeout" */
+				TIMEOUT, '\0',
+				'\0',	/* "tsize" */
+				priv->filesize, '\0',
+				'\0');	/* "blksize" */
 		pkt++;
 		len = pkt - xp;
 		break;
-- 
2.37.1





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux