Ticket #5157: libs_libmythtv_eitfixup.cpp-make-code-more-readable.patch

File libs_libmythtv_eitfixup.cpp-make-code-more-readable.patch, 965 bytes (added by Erik Hovland <erik@…>, 12 years ago)

break count increment out of conditional to make analysis tool happy

  • libs/libmythtv/eitfixup.cpp

    count() can return some funky values. So check it before adding it to anything.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     libs/libmythtv/eitfixup.cpp |    5 ++---
     1 files changed, 2 insertions(+), 3 deletions(-)
    
    diff --git a/libs/libmythtv/eitfixup.cpp b/libs/libmythtv/eitfixup.cpp
    index 6ec5fd2..f9d537e 100644
    a b void EITFixUp::SetUKSubtitle(DBEvent &event) const 
    342342             int i;
    343343             for (i =0; (i<(int)strListColon.count()) && (nTitleMax==-1);i++)
    344344             {
    345                  if ((nTitle+=
    346                      QStringList::split(" ",strListColon[i],TRUE).count())
    347                           <kMaxToTitle)
     345                 nTitle+=QStringList::split(" ",strListColon[i],TRUE).count();
     346                 if (nTitle<kMaxToTitle)
    348347                     strListTmp.push_back(strListColon[i]);
    349348                 else
    350349                     nTitleMax=i;