Ticket #4661: inputid-should-be-signed.patch

File inputid-should-be-signed.patch, 894 bytes (added by Erik Hovland <erik@…>, 16 years ago)

Changes the inputid variable to a signed type

  • libs/libmythtv/dvbchannel.cpp

    If inputid is unsigned then checking if it is less then zero will
    
    From: Erik Hovland <erik@hovland.org>
    
    never be true no matter what the value is. This fix changes the type
    to int instead of uint.
    ---
    
     libs/libmythtv/dvbchannel.cpp |    2 +-
     1 files changed, 1 insertions(+), 1 deletions(-)
    
    diff --git a/libs/libmythtv/dvbchannel.cpp b/libs/libmythtv/dvbchannel.cpp
    index ee57777..338e625 100644
    a b void DVBChannel::SetTimeOffset(double offset) 
    637637
    638638bool DVBChannel::Tune(const DTVMultiplex &tuning, QString inputname)
    639639{
    640     uint inputid = inputname.isEmpty() ? currentInputID : GetInputByName(inputname);
     640    int inputid = inputname.isEmpty() ? currentInputID : GetInputByName(inputname);
    641641    if (inputid < 0)
    642642    {
    643643        VERBOSE(VB_IMPORTANT, LOC_ERR + QString("Tune(): Invalid input '%1'.")