ufs2: Fix porentially uninited use of fName field
At the same time make it in line with ext2 module Change-Id: Iab879cf532cbc0b58b23cdd97d50419c21d199b6 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6849 Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
This commit is contained in:
parent
454dc0e951
commit
a4845b5416
@ -30,10 +30,8 @@ ufs2_super_block::IsValid()
|
||||
const char*
|
||||
Volume::Name() const
|
||||
{
|
||||
if (fSuperBlock.fs_volname[0])
|
||||
return fSuperBlock.fs_volname;
|
||||
|
||||
return fName;
|
||||
// The name may be empty, in that case, userspace will generate one.
|
||||
return fSuperBlock.fs_volname;
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,7 +46,6 @@ static status_t Identify(int fd, ufs2_super_block* superBlock);
|
||||
mutex fLock;
|
||||
uint32 fFlags;
|
||||
Inode* fRootNode;
|
||||
char fName[32];
|
||||
};
|
||||
|
||||
#endif // VOLUME_H
|
||||
|
Loading…
Reference in New Issue
Block a user