ide-cd: coding style fixes for cdrom_get_toc_entry()

This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.
Acked-by: default avatarSergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent a1bb9457
...@@ -2014,11 +2014,13 @@ static int cdrom_get_toc_entry(ide_drive_t *drive, int track, ...@@ -2014,11 +2014,13 @@ static int cdrom_get_toc_entry(ide_drive_t *drive, int track,
/* Check validity of requested track number. */ /* Check validity of requested track number. */
ntracks = toc->hdr.last_track - toc->hdr.first_track + 1; ntracks = toc->hdr.last_track - toc->hdr.first_track + 1;
if (toc->hdr.first_track == CDROM_LEADOUT) ntracks = 0;
if (toc->hdr.first_track == CDROM_LEADOUT)
ntracks = 0;
if (track == CDROM_LEADOUT) if (track == CDROM_LEADOUT)
*ent = &toc->ent[ntracks]; *ent = &toc->ent[ntracks];
else if (track < toc->hdr.first_track || else if (track < toc->hdr.first_track || track > toc->hdr.last_track)
track > toc->hdr.last_track)
return -EINVAL; return -EINVAL;
else else
*ent = &toc->ent[track - toc->hdr.first_track]; *ent = &toc->ent[track - toc->hdr.first_track];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment