Details
-
Bug
-
Resolution: Fixed
-
Major
-
None
Description
In file id_init.cpp at Uniata driver there is a wrong/duplicate parameter checking:
if(!LunExt->IdentifyData.SectorsPerTrack ||
!LunExt->IdentifyData.NumberOfCylinders ||
!LunExt->IdentifyData.SectorsPerTrack)
{
//code//
}
As you can see !LunExt->IdentifyData.SectorsPerTrack appears duplicated.
I think this could be the typical copy->paste issue.
Probably, the author must check this assumption, the code was meant to be:
if(!LunExt->IdentifyData.SectorsPerTrack ||
!LunExt->IdentifyData.NumberOfCylinders ||
!LunExt->IdentifyData.NumberOfHeads)
I have attached a Patch with this potential fix, so if the fix is correct you have just to commit it in the next awesome UniAta release
Bug detected by PVS-Studio
Attachments
Issue Links
- is duplicated by
-
CORE-6733 uniata: Code defect found by cppcheck
- Resolved