Ticket #4938: libs_libmythtv_mhi.cpp-length-test-is-superflous.patch

File libs_libmythtv_mhi.cpp-length-test-is-superflous.patch, 1.0 KB (added by Erik Hovland <erik@…>, 16 years ago)

remove second length check

  • libs/libmythtv/mhi.cpp

    The length test in MHIContext::SetNetBootInfo at the top takes care of any
    
    From: Erik Hovland <erik@hovland.org>
    
    length testing and the next one is useless.
    ---
    
     libs/libmythtv/mhi.cpp |    7 ++-----
     1 files changed, 2 insertions(+), 5 deletions(-)
    
    diff --git a/libs/libmythtv/mhi.cpp b/libs/libmythtv/mhi.cpp
    index 0390e49..05fc7f5 100644
    a b void MHIContext::SetNetBootInfo(const unsigned char *data, uint length) 
    259259    QMutexLocker locker(&m_dsmccLock);
    260260    // Save the data from the descriptor.
    261261    m_nbiData.duplicate(data, length);
    262     // If there is no Network Boot Info or we're setting it
    263     // for the first time just update the "last version".
    264     if (length < 2)
    265         m_lastNbiVersion = NBI_VERSION_ABSENT;
    266     else if (m_lastNbiVersion == NBI_VERSION_UNSET)
     262    // If we're setting it for the first time just update the "last version".
     263    if (m_lastNbiVersion == NBI_VERSION_UNSET)
    267264        m_lastNbiVersion = data[0];
    268265    else
    269266        m_engine_wait.wakeAll();