Subject: Fix compile error in GCC 4.1.2

This commit is contained in:
Leonardo Maccari Rufino 2017-06-07 18:14:35 -03:00 committed by Andy Green
parent 02638f6758
commit 568aae9c2d

View file

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