From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lukasz Majewski Date: Mon, 12 Sep 2016 12:43:33 +0200 Subject: [U-Boot] [PATCH 1/4] fs/fat: Remove two statements without effect In-Reply-To: References: <20160911205142.4259-1-stefan.bruens@rwth-aachen.de> Message-ID: <20160912124333.41eb59e8@amdc2363> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Stefan, > 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 > --- > fs/fat/fat_write.c | 5 +---- > 1 file changed, 1 insertion(+), 4 deletions(-) > > diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c > index eb3a916..961ccd8 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 { Acked-by: Lukasz Majewski -- Best regards, Lukasz Majewski Samsung R&D Institute Poland (SRPOL) | Linux Platform Group