From ce8f80028ed7e9b4c8449209ea090c7b82f016da Mon Sep 17 00:00:00 2001 From: alex Date: Mon, 31 Jan 2005 11:21:31 +0000 Subject: adding proper parenthesing git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14620 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/pullup.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libmpcodecs/pullup.c') diff --git a/libmpcodecs/pullup.c b/libmpcodecs/pullup.c index 3627084cb5..c21639f1cf 100644 --- a/libmpcodecs/pullup.c +++ b/libmpcodecs/pullup.c @@ -218,16 +218,16 @@ static void alloc_buffer(struct pullup_context *c, struct pullup_buffer *b) 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 @@ struct pullup_buffer *pullup_get_buffer(struct pullup_context *c, int parity) /* 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); } -- cgit v1.2.3