diff --git a/lib/libtuxtxt/tuxtxt_common.h b/lib/libtuxtxt/tuxtxt_common.h index 436a310b2..72ed934d8 100644 --- a/lib/libtuxtxt/tuxtxt_common.h +++ b/lib/libtuxtxt/tuxtxt_common.h @@ -530,7 +530,7 @@ void tuxtxt_clear_p26(tstExtData* extData) for(int i = 0; i < 16; ++i) { - if(0 != extData->p26[i]) + if(extData->p26[i] != 0) { memset(extData->p26[i], 0x00, 13 * 3); } diff --git a/src/gui/epgview.cpp b/src/gui/epgview.cpp index 7993f91d0..dfdf512c9 100644 --- a/src/gui/epgview.cpp +++ b/src/gui/epgview.cpp @@ -94,7 +94,7 @@ void reformatExtendedEvents(std::string strItem, std::string strLabel, bool bUse sprintf(index, "%d", nItem); // Look for matching items int nPos = findItem(std::string(strItem) + std::string(index), vecDescriptions); - if (-1 != nPos) { + if (nPos != -1) { std::string item = std::string(vecItems[nPos]); vecDescriptions.erase(vecDescriptions.begin() + nPos); vecItems.erase(vecItems.begin() + nPos); @@ -115,7 +115,7 @@ void reformatExtendedEvents(std::string strItem, std::string strLabel, bool bUse } else { // Single string event (e.g. Director) // Look for matching items int nPos = findItem(strItem, vecDescriptions); - if (-1 != nPos) { + if (nPos != -1) { vecDescriptions[nPos] = strLabel; } } diff --git a/src/nhttpd/yhttpd_core/ysocket.cpp b/src/nhttpd/yhttpd_core/ysocket.cpp index 9ac5d0a8d..705926101 100644 --- a/src/nhttpd/yhttpd_core/ysocket.cpp +++ b/src/nhttpd/yhttpd_core/ysocket.cpp @@ -90,7 +90,7 @@ bool CySocket::initAsSSL(void) return false; } SSL_set_accept_state(ssl); // accept connection - if(1 != (SSL_set_fd(ssl, sock))) // associate socket descriptor + if((SSL_set_fd(ssl, sock)) != 1) // associate socket descriptor if (NULL == (ssl = SSL_new(CySocket::SSL_ctx))) { aprintf("ySocket:SSL Error: Create SSL_new : %s\n", ERR_error_string(ERR_get_error(), NULL) ); @@ -122,7 +122,7 @@ bool CySocket::initSSL(void) return false; } if(!SSL_CA_file.empty()) // have a CA? - if(1 != SSL_CTX_load_verify_locations(SSL_ctx, SSL_CA_file.c_str(), NULL)) + if(SSL_CTX_load_verify_locations(SSL_ctx, SSL_CA_file.c_str(), NULL) != 1) { aprintf("ySocket:SSL Error: %s CA-File:%s\n",ERR_error_string(ERR_get_error(), NULL), SSL_CA_file.c_str()); return false; diff --git a/src/nhttpd/yhttpd_mods/mod_sendfile.cpp b/src/nhttpd/yhttpd_mods/mod_sendfile.cpp index b7efb6d4c..fe77f3687 100644 --- a/src/nhttpd/yhttpd_mods/mod_sendfile.cpp +++ b/src/nhttpd/yhttpd_mods/mod_sendfile.cpp @@ -119,8 +119,8 @@ THandleStatus CmodSendfile::Hook_PrepareResponse(CyhookHandler *hh) { hh->RangeEnd = hh->ContentLength - 1; const char *range = (hh->HeaderList["Range"].empty()) ? NULL : hh->HeaderList["Range"].c_str(); if ((range && - (2 != sscanf(range, "bytes=%" PRId64 "-%" PRId64, &hh->RangeStart, &hh->RangeEnd)) && - (1 != sscanf(range, "bytes=%" PRId64 "-", &hh->RangeStart))) + (sscanf(range, "bytes=%" PRId64 "-%" PRId64, &hh->RangeStart, &hh->RangeEnd) != 2) && + (sscanf(range, "bytes=%" PRId64 "-", &hh->RangeStart) != 1)) || (hh->RangeStart > hh->RangeEnd) || (hh->RangeEnd > hh->ContentLength - 1)) { hh->SetError(HTTP_REQUEST_RANGE_NOT_SATISFIABLE); diff --git a/src/zapit/src/udpstreampes.cpp b/src/zapit/src/udpstreampes.cpp index 2e74048da..37c9ab8e5 100644 --- a/src/zapit/src/udpstreampes.cpp +++ b/src/zapit/src/udpstreampes.cpp @@ -433,7 +433,7 @@ void * TcpReceiver( void * Ptr ) while(true) { ReadLine( TcpString ); if( !strncmp(TcpString, "RESEND", 6)) { - if ( 2 != sscanf(TcpString, "RESEND %u %s", &SPktBuf, PacketString) ) { + if (sscanf(TcpString, "RESEND %u %s", &SPktBuf, PacketString) != 2) { fprintf(stderr, "ERROR: TcpReceiver - sscanf RESEND\n"); continue; }