Uploaded image for project: 'Core ReactOS'
  1. Core ReactOS
  2. CORE-7046

UniAtaReadLunConfig() wrong/duplicate parameter checking

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • None
    • Drivers: Other

    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

          Activity

            People

              alter-1 alter-1
              vicmarcal vicmarcal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: