Subject: Fix compile error in GCC 4.1.2
This commit is contained in:
parent
02638f6758
commit
568aae9c2d
1 changed files with 4 additions and 4 deletions
|
@ -263,19 +263,19 @@ static const struct test tests[] = {
|
|||
}, { 0, 4 }, 1 },
|
||||
};
|
||||
|
||||
static const int ring_size(struct ring *r)
|
||||
static int ring_size(struct ring *r)
|
||||
{
|
||||
return sizeof(r->buf);
|
||||
}
|
||||
static const int ring_used(struct ring *r)
|
||||
static int ring_used(struct ring *r)
|
||||
{
|
||||
return (r->head - r->tail) & (ring_size(r) - 1);
|
||||
}
|
||||
static const int ring_free(struct ring *r)
|
||||
static int ring_free(struct ring *r)
|
||||
{
|
||||
return (ring_size(r) - 1) - ring_used(r);
|
||||
}
|
||||
static const int ring_get_one(struct ring *r)
|
||||
static int ring_get_one(struct ring *r)
|
||||
{
|
||||
int n = r->buf[r->tail] & 255;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue