[MPlayer-cvslog] CVS: main/libmpcodecs pullup.c,1.20,1.21

Alex Beregszaszi syncmail at mplayerhq.hu
Mon Jan 31 12:21:33 CET 2005


CVS change done by Alex Beregszaszi

Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv15342

Modified Files:
	pullup.c 
Log Message:
adding proper parenthesing

Index: pullup.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/pullup.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- pullup.c	21 Oct 2004 11:55:19 -0000	1.20
+++ pullup.c	31 Jan 2005 11:21:31 -0000	1.21
@@ -218,16 +218,16 @@
 struct pullup_buffer *pullup_lock_buffer(struct pullup_buffer *b, int parity)
 {
 	if (!b) return 0;
-	if (parity+1 & 1) b->lock[0]++;
-	if (parity+1 & 2) b->lock[1]++;
+	if ((parity+1) & 1) b->lock[0]++;
+	if ((parity+1) & 2) b->lock[1]++;
 	return b;
 }
 
 void pullup_release_buffer(struct pullup_buffer *b, int parity)
 {
 	if (!b) return;
-	if (parity+1 & 1) b->lock[0]--;
-	if (parity+1 & 2) b->lock[1]--;
+	if ((parity+1) & 1) b->lock[0]--;
+	if ((parity+1) & 2) b->lock[1]--;
 }
 
 struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity)
@@ -253,8 +253,8 @@
 	
 	/* Search for any half-free buffer */
 	for (i = 0; i < c->nbuffers; i++) {
-		if (parity+1 & 1 && c->buffers[i].lock[0]) continue;
-		if (parity+1 & 2 && c->buffers[i].lock[1]) continue;
+		if (((parity+1) & 1) && c->buffers[i].lock[0]) continue;
+		if (((parity+1) & 2) && c->buffers[i].lock[1]) continue;
 		alloc_buffer(c, &c->buffers[i]);
 		return pullup_lock_buffer(&c->buffers[i], parity);
 	}




More information about the MPlayer-cvslog mailing list