From f47f33ac81aab18ba30f988f66cba989410e8c5b Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Sun, 24 Aug 2008 18:34:08 +0000 Subject: [PATCH] Cosmetics --- src/input/r_ac3.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/input/r_ac3.cpp b/src/input/r_ac3.cpp index 3f4b2da89..081dcc120 100644 --- a/src/input/r_ac3.cpp +++ b/src/input/r_ac3.cpp @@ -75,8 +75,7 @@ ac3_reader_c::ac3_reader_c(track_info_c &_ti) throw error_c("ac3_reader: Could not open the source file."); } - int pos = find_ac3_header(chunk->get(), AC3_READ_SIZE, &ac3header); - if (pos < 0) + if (0 > find_ac3_header(chunk->get(), AC3_READ_SIZE, &ac3header)) throw error_c(mxsprintf("ac3_reader: No valid AC3 packet found in the first %d bytes.\n", AC3_READ_SIZE)); bytes_processed = 0; @@ -106,7 +105,7 @@ ac3_reader_c::read(generic_packetizer_c *, int read_len = MXMIN(AC3_READ_SIZE, remaining_bytes); int num_read = io->read(chunk->get(), read_len); - if (num_read < 0) { + if (0 > num_read) { PTZR0->flush(); return FILE_STATUS_DONE; } @@ -114,7 +113,7 @@ ac3_reader_c::read(generic_packetizer_c *, PTZR0->process(new packet_t(new memory_c(chunk->get(), num_read, false))); bytes_processed += num_read; - if ((remaining_bytes - num_read) > 0) + if (0 < (remaining_bytes - num_read)) return FILE_STATUS_MOREDATA; PTZR0->flush();