adding proper parenthesing

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14620 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
alex 2005-01-31 11:21:31 +00:00
parent c95c1533a1
commit ce8f80028e
1 changed files with 6 additions and 6 deletions

View File

@ -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);
}