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:
Vladimir Serbinenko 2023-08-20 17:37:52 +02:00 committed by Adrien Destugues
parent 454dc0e951
commit a4845b5416
2 changed files with 2 additions and 5 deletions

View File

@ -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;
}

View File

@ -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