patch from Honza Horak using Coverity's static analysis tool.
This commit is contained in:
@@ -335,6 +335,7 @@ main(int argc, char *argv[])
|
||||
i_volume_level = atoi(optarg);
|
||||
todo = SET_VOLUME;
|
||||
}
|
||||
break;
|
||||
case 't':
|
||||
if (NULL != (h = strchr(optarg,'-'))) {
|
||||
*h = 0;
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
static void
|
||||
print_mode_sense (const char *psz_drive, const char *six_or_ten,
|
||||
const uint8_t buf[22])
|
||||
const uint8_t buf[30])
|
||||
{
|
||||
printf("Mode sense %s information for %s:\n", six_or_ten, psz_drive);
|
||||
if (buf[2] & 0x01) {
|
||||
@@ -210,7 +210,7 @@ main(int argc, const char *argv[])
|
||||
printf("Couldn't find CD\n");
|
||||
return 77;
|
||||
} else {
|
||||
uint8_t buf[22] = { 0, }; /* Place to hold returned data */
|
||||
uint8_t buf[30] = { 0, }; /* Place to hold returned data */
|
||||
char *psz_cd = cdio_get_default_device(p_cdio);
|
||||
if (DRIVER_OP_SUCCESS == mmc_mode_sense_6(p_cdio, buf, sizeof(buf),
|
||||
CDIO_MMC_CAPABILITIES_PAGE) ) {
|
||||
|
||||
@@ -131,6 +131,10 @@ main(int argc, const char *argv[])
|
||||
track_t i_track = cdda_sector_gettrack(d, i_first_lsn);
|
||||
lsn_t i_last_lsn = cdda_track_lastsector(d, i_track);
|
||||
int fd = creat("track1s.wav", 0644);
|
||||
if (-1 == fd) {
|
||||
printf("Unable to create track1s.wav\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* For demo purposes we'll read only 300 frames (about 4
|
||||
seconds). We don't want this to take too long. On the other
|
||||
|
||||
Reference in New Issue
Block a user