From: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Date: Sun, 11 Sep 2016 20:51:39 +0000 (+0200)
Subject: fs/fat: Remove two statements without effect
X-Git-Tag: v2025.01-rc5-pxa1908~8531
X-Git-Url: http://git.dujemihanovic.xyz/%22http:/kyber.dk/phpMyBuilder/static/%7B%7B%20%28.OutputFormats.Get?a=commitdiff_plain;h=ed76f912777066c788ae7e9cfb1d5e19e8c35274;p=u-boot.git

fs/fat: Remove two statements without effect

fatlength is a local variable which is no more used after the assignment.
s_name is not used in the function, save the strncpy.

Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de>
Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Benoît Thébaudeau <benoit.thebaudeau.dev@gmail.com>
---

diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index eb3a916948..961ccd8e24 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -183,7 +183,6 @@ static __u32 get_fatent_value(fsdata *mydata, __u32 entry)
 		if (getsize > fatlength)
 			getsize = fatlength;
 
-		fatlength *= mydata->sect_size;	/* We want it in bytes now */
 		startblock += mydata->fat_sect;	/* Offset from start of disk */
 
 		/* Write back the fatbuf to the disk */
@@ -326,10 +325,8 @@ fill_dir_slot(fsdata *mydata, dir_entry **dentptr, const char *l_name)
 	dir_slot *slotptr = (dir_slot *)get_contents_vfatname_block;
 	__u8 counter = 0, checksum;
 	int idx = 0, ret;
-	char s_name[16];
 
-	/* Get short file name and checksum value */
-	strncpy(s_name, (*dentptr)->name, 16);
+	/* Get short file name checksum value */
 	checksum = mkcksum((*dentptr)->name, (*dentptr)->ext);
 
 	do {