diff --git a/lib/libtuxtxt/tuxtxt.cpp b/lib/libtuxtxt/tuxtxt.cpp index 7ce893f91..6594d1128 100644 --- a/lib/libtuxtxt/tuxtxt.cpp +++ b/lib/libtuxtxt/tuxtxt.cpp @@ -110,7 +110,7 @@ void gethotlist() if (!fgets(line, sizeof(line), hl)) break; - if (1 == sscanf(line, "%x", (unsigned int*)&hotlist[maxhotlist+1])) + if (sscanf(line, "%x", (unsigned int*)&hotlist[maxhotlist+1]) == 1) { if (hotlist[maxhotlist+1] >= 0x100 && hotlist[maxhotlist+1] <= 0x899) { @@ -1966,58 +1966,58 @@ int Init(int source) if (!fgets(line, sizeof(line), conf)) break; - if (1 == sscanf(line, "ScreenMode16x9Normal %i", &ival)) + if (sscanf(line, "ScreenMode16x9Normal %i", &ival) == 1) screen_mode1 = ival & 1; - else if (1 == sscanf(line, "Brightness %i", &ival)) + else if (sscanf(line, "Brightness %i", &ival) == 1) color_mode = ival; - else if (1 == sscanf(line, "AutoNational %i", &ival)) + else if (sscanf(line, "AutoNational %i", &ival) == 1) auto_national = ival & 1; - else if (1 == sscanf(line, "NationalSubset %i", &ival)) + else if (sscanf(line, "NationalSubset %i", &ival) == 1) { if (ival >= 0 && ival <= (int) MAX_NATIONAL_SUBSET) national_subset = ival; } - else if (1 == sscanf(line, "MenuLanguage %i", &ival)) + else if (sscanf(line, "MenuLanguage %i", &ival) == 1) { if (ival >= 0 && ival <= MAXMENULANGUAGE) menulanguage = ival; } - else if (1 == sscanf(line, "SwapUpDown %i", &ival)) + else if (sscanf(line, "SwapUpDown %i", &ival) == 1) swapupdown = ival & 1; - else if (1 == sscanf(line, "ShowHexPages %i", &ival)) + else if (sscanf(line, "ShowHexPages %i", &ival) == 1) showhex = ival & 1; - else if (1 == sscanf(line, "Transparency %i", &ival)) + else if (sscanf(line, "Transparency %i", &ival) == 1) trans_mode = ival; - else if (1 == sscanf(line, "TTFWidthFactor16 %i", &ival)) + else if (sscanf(line, "TTFWidthFactor16 %i", &ival) == 1) TTFWidthFactor16 = ival; - else if (1 == sscanf(line, "TTFHeightFactor16 %i", &ival)) + else if (sscanf(line, "TTFHeightFactor16 %i", &ival) == 1) TTFHeightFactor16 = ival; - else if (1 == sscanf(line, "TTFShiftX %i", &ival)) + else if (sscanf(line, "TTFShiftX %i", &ival) == 1) TTFShiftX = ival; - else if (1 == sscanf(line, "TTFShiftY %i", &ival)) + else if (sscanf(line, "TTFShiftY %i", &ival) == 1) TTFShiftY = ival; - else if (1 == sscanf(line, "Screenmode %i", &ival)) + else if (sscanf(line, "Screenmode %i", &ival) == 1) screenmode[0] = ival; - else if (1 == sscanf(line, "ScreenmodeBoxed %i", &ival)) + else if (sscanf(line, "ScreenmodeBoxed %i", &ival) == 1) screenmode[1] = ival; - else if (1 == sscanf(line, "ShowFLOF %i", &ival)) + else if (sscanf(line, "ShowFLOF %i", &ival) == 1) showflof = ival & 1; - else if (1 == sscanf(line, "Show39 %i", &ival)) + else if (sscanf(line, "Show39 %i", &ival) == 1) show39 = ival & 1; - else if (1 == sscanf(line, "ShowLevel2p5 %i", &ival)) + else if (sscanf(line, "ShowLevel2p5 %i", &ival) == 1) showl25 = ival & 1; - else if (1 == sscanf(line, "DumpLevel2p5 %i", &ival)) + else if (sscanf(line, "DumpLevel2p5 %i", &ival) == 1) dumpl25 = ival & 1; - else if (1 == sscanf(line, "UseTTF %i", &ival)) + else if (sscanf(line, "UseTTF %i", &ival) == 1) usettf = ival & 1; #if 0 - else if (1 == sscanf(line, "StartX %i", &ival)) + else if (sscanf(line, "StartX %i", &ival) == 1) sx = ival; - else if (1 == sscanf(line, "EndX %i", &ival)) + else if (sscanf(line, "EndX %i", &ival) == 1) ex = ival; - else if (1 == sscanf(line, "StartY %i", &ival)) + else if (sscanf(line, "StartY %i", &ival) == 1) sy = ival; - else if (1 == sscanf(line, "EndY %i", &ival)) + else if (sscanf(line, "EndY %i", &ival) == 1) ey = ival; #endif } diff --git a/src/zapit/src/udpstreampes.cpp b/src/zapit/src/udpstreampes.cpp index fcf043a39..2e74048da 100644 --- a/src/zapit/src/udpstreampes.cpp +++ b/src/zapit/src/udpstreampes.cpp @@ -229,14 +229,14 @@ void * DmxTSReader( void * /*Ptr*/ ) Stream[u].Filter.pes_type=DMX_PES_OTHER; Stream[u].Filter.flags=0; //Stream[u].Filter.flags=DMX_IMMEDIATE_START; - if (-1==ioctl(Stream[u].fd, DMX_SET_PES_FILTER, &(Stream[u].Filter)) ) { + if (ioctl(Stream[u].fd, DMX_SET_PES_FILTER, &(Stream[u].Filter)) == -1) { perror("ERROR: main() - DMX_SET_PES_FILTER ioctl"); fprintf(stderr, "EXIT\n"); fflush(stderr); exit(-1); } - if ( -1==ioctl(Stream[u].fd, DMX_START, 0) ) { + if (ioctl(Stream[u].fd, DMX_START, 0) == -1) { perror("ERROR: DmxReader() - DMX_START ioctl"); fprintf(stderr, "EXIT\n"); fflush(stderr); @@ -252,14 +252,14 @@ void * DmxTSReader( void * /*Ptr*/ ) Stream[u].Filter.pes_type=DMX_PES_OTHER; Stream[u].Filter.flags=0; //Stream[u].Filter.flags=DMX_IMMEDIATE_START; - if (-1==ioctl(Stream[u].fd, DMX_SET_PES_FILTER, &(Stream[u].Filter)) ) { + if (ioctl(Stream[u].fd, DMX_SET_PES_FILTER, &(Stream[u].Filter)) == -1) { perror("ERROR: main() - DMX_SET_PES_FILTER ioctl"); fprintf(stderr, "EXIT\n"); fflush(stderr); exit(-1); } - if ( -1==ioctl(Stream[u].fd, DMX_START, 0) ) { + if (ioctl(Stream[u].fd, DMX_START, 0) == -1) { perror("ERROR: DmxReader() - DMX_START ioctl"); fprintf(stderr, "EXIT\n"); fflush(stderr); @@ -345,14 +345,14 @@ void * DmxReader( void * Ptr ) //CurStream->Filter.flags=0; CurStream->Filter.flags=DMX_IMMEDIATE_START; - if (-1==ioctl(CurStream->fd, DMX_SET_PES_FILTER, &(CurStream->Filter)) ) { + if (ioctl(CurStream->fd, DMX_SET_PES_FILTER, &(CurStream->Filter)) == -1) { perror("ERROR: main() - DMX_SET_PES_FILTER ioctl"); fprintf(stderr, "EXIT\n"); fflush(stderr); exit(-1); } - if ( -1==ioctl(CurStream->fd, DMX_START, 0) ) { + if (ioctl(CurStream->fd, DMX_START, 0) == -1) { perror("ERROR: DmxReader() - DMX_START ioctl"); fprintf(stderr, "EXIT\n"); fflush(stderr);