mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-19 10:44:14 +08:00
staging: erofs: clean up initialization of pointer de
Currently pointer de is being initialized with a value that is never read and a few statements later de is being re-assigned. Clean this up by ininitialzing de and removing the re-assignment. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Gao Xiang <gaoxiang25@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
7c23143199
commit
5c8004ce61
@ -42,10 +42,9 @@ static int erofs_fill_dentries(struct dir_context *ctx,
|
|||||||
void *dentry_blk, unsigned int *ofs,
|
void *dentry_blk, unsigned int *ofs,
|
||||||
unsigned int nameoff, unsigned int maxsize)
|
unsigned int nameoff, unsigned int maxsize)
|
||||||
{
|
{
|
||||||
struct erofs_dirent *de = dentry_blk;
|
struct erofs_dirent *de = dentry_blk + *ofs;
|
||||||
const struct erofs_dirent *end = dentry_blk + nameoff;
|
const struct erofs_dirent *end = dentry_blk + nameoff;
|
||||||
|
|
||||||
de = dentry_blk + *ofs;
|
|
||||||
while (de < end) {
|
while (de < end) {
|
||||||
const char *de_name;
|
const char *de_name;
|
||||||
unsigned int de_namelen;
|
unsigned int de_namelen;
|
||||||
|
Loading…
Reference in New Issue
Block a user