Ticket #6997: libs_libmythdvdnav-precedence-fix

File libs_libmythdvdnav-precedence-fix, 1.0 KB (added by Erik Hovland <erik@…>, 15 years ago)

Use parens to guarantee precedence

Line 
1Use parens to suppress precedence errors
2
3From: Erik Hovland <erik@hovland.org>
4
5
6---
7
8 mythtv/libs/libmythdvdnav/dvdread/ifo_read.c |    4 ++--
9 1 files changed, 2 insertions(+), 2 deletions(-)
10
11
12diff --git a/mythtv/libs/libmythdvdnav/dvdread/ifo_read.c b/mythtv/libs/libmythdvdnav/dvdread/ifo_read.c
13index 82e915d..682589a 100644
14--- a/mythtv/libs/libmythdvdnav/dvdread/ifo_read.c
15+++ b/mythtv/libs/libmythdvdnav/dvdread/ifo_read.c
16@@ -844,10 +844,10 @@ static int ifoRead_PGC(ifo_handle_t *ifofile, pgc_t *pgc, unsigned int offset) {
17 
18   /* verify time (look at print_time) */
19   for(i = 0; i < 8; i++)
20-    if(!pgc->audio_control[i] & 0x8000) /* The 'is present' bit */
21+    if(!(pgc->audio_control[i] & 0x8000)) /* The 'is present' bit */
22       CHECK_ZERO(pgc->audio_control[i]);
23   for(i = 0; i < 32; i++)
24-    if(!pgc->subp_control[i] & 0x80000000) /* The 'is present' bit */
25+    if(!(pgc->subp_control[i] & 0x80000000)) /* The 'is present' bit */
26       CHECK_ZERO(pgc->subp_control[i]);
27 
28   /* Check that time is 0:0:0:0 also if nr_of_programs == 0 */