From: "Stefan Brüns" <stefan.bruens@rwth-aachen.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/4] fs/fat: Remove two statements without effect
Date: Sun, 11 Sep 2016 22:51:39 +0200 [thread overview]
Message-ID: <ebd7da8b37cd4c33be0426a3675f3dcf@rwthex-w2-b.rwth-ad.de> (raw)
In-Reply-To: <20160911205142.4259-1-stefan.bruens@rwth-aachen.de>
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>
---
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 {
--
2.10.0
next parent reply other threads:[~2016-09-11 20:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20160911205142.4259-1-stefan.bruens@rwth-aachen.de>
2016-09-11 20:51 ` Stefan Brüns [this message]
2016-09-12 10:43 ` [U-Boot] [PATCH 1/4] fs/fat: Remove two statements without effect Lukasz Majewski
2016-09-12 18:48 ` Stephen Warren
2016-09-12 20:15 ` Benoît Thébaudeau
2016-09-23 19:55 ` [U-Boot] [U-Boot, " Tom Rini
2016-09-11 20:51 ` [U-Boot] [PATCH 2/4] fs/fat: Do not write unmodified fat entries to disk Stefan Brüns
2016-09-12 10:56 ` Lukasz Majewski
2016-09-23 19:55 ` [U-Boot] [U-Boot, " Tom Rini
2016-09-11 20:51 ` [U-Boot] [PATCH 3/4] fs/fat: Correct description of determine_fatent function Stefan Brüns
2016-09-12 11:04 ` Lukasz Majewski
2016-09-23 19:55 ` [U-Boot] [U-Boot, " Tom Rini
2016-09-11 20:51 ` [U-Boot] [PATCH 4/4] cmd/fat: Do not crash on write when <bytes> is not specified Stefan Brüns
2016-09-19 0:57 ` Simon Glass
2016-09-23 19:55 ` [U-Boot] [U-Boot, " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ebd7da8b37cd4c33be0426a3675f3dcf@rwthex-w2-b.rwth-ad.de \
--to=stefan.bruens@rwth-aachen.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.