Skip to content

Commit c6fc663

Browse files
Villemoessmfrench
authored andcommitted
cifs: use %16phN for formatting md5 sum
Passing a gazillion arguments takes a lot of code: add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-253 (-253) Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com> Signed-off-by: Steve French <smfrench@gmail.com>
1 parent 06deeec commit c6fc663

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

fs/cifs/link.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@
4545
(CIFS_MF_SYMLINK_LINK_OFFSET + CIFS_MF_SYMLINK_LINK_MAXLEN)
4646

4747
#define CIFS_MF_SYMLINK_LEN_FORMAT "XSym\n%04u\n"
48-
#define CIFS_MF_SYMLINK_MD5_FORMAT \
49-
"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x\n"
50-
#define CIFS_MF_SYMLINK_MD5_ARGS(md5_hash) \
51-
md5_hash[0], md5_hash[1], md5_hash[2], md5_hash[3], \
52-
md5_hash[4], md5_hash[5], md5_hash[6], md5_hash[7], \
53-
md5_hash[8], md5_hash[9], md5_hash[10], md5_hash[11],\
54-
md5_hash[12], md5_hash[13], md5_hash[14], md5_hash[15]
48+
#define CIFS_MF_SYMLINK_MD5_FORMAT "%16phN\n"
49+
#define CIFS_MF_SYMLINK_MD5_ARGS(md5_hash) md5_hash
5550

5651
static int
5752
symlink_hash(unsigned int link_len, const char *link_str, u8 *md5_hash)

0 commit comments

Comments
 (0)