Skip to content
Permalink
Browse files

Refs #12638: DVBv5 API: Fix ProbeDVBType variable usage

  • Loading branch information...
mspieth committed Oct 11, 2017
1 parent 8f27146 commit 5acf389804547d27ddb33a9a7e1163f869c4eef4
Showing with 3 additions and 5 deletions.
  1. +3 −5 mythtv/libs/libmythtv/cardutil.cpp
@@ -507,7 +507,7 @@ QString CardUtil::ProbeDVBType(const QString &device)
int fd_frontend = open(dev.constData(), O_RDWR | O_NONBLOCK);
if (fd_frontend < 0)
{
LOG(VB_GENERAL, LOG_ERR, QString("Can't open DVB frontend (%1) for %2.")
LOG(VB_GENERAL, LOG_ERR, QString("Can't open DVB frontend (%1) for %2." + ENO)
.arg(dvbdev).arg(device));
return ret;
}
@@ -533,7 +533,6 @@ QString CardUtil::ProbeDVBType(const QString &device)
type = DTVTunerType::kTunerTypeDVBT2;
}
#endif // HAVE_FE_CAN_2G_MODULATION
ret = (type.toString() != "UNKNOWN") ? type.toString().toUpper() : ret;

#if DVB_API_VERSION >=5
unsigned int i;
@@ -545,8 +544,7 @@ QString CardUtil::ProbeDVBType(const QString &device)
cmd.num = 1;
cmd.props = &prop;

ret = ioctl(fd_frontend, FE_GET_PROPERTY, &cmd);
if (ret == 0)
if (ioctl(fd_frontend, FE_GET_PROPERTY, &cmd) == 0)
{
for (i = 0; i < prop.u.buffer.len; i++)
{
@@ -566,9 +564,9 @@ QString CardUtil::ProbeDVBType(const QString &device)
}
}
#endif

close(fd_frontend);

ret = (type.toString() != "UNKNOWN") ? type.toString().toUpper() : ret;
#endif // USING_DVB

return ret;

0 comments on commit 5acf389

Please sign in to comment.
You can’t perform that action at this time.