summaryrefslogtreecommitdiff
path: root/source/html/css-parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/html/css-parse.c')
-rw-r--r--source/html/css-parse.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/html/css-parse.c b/source/html/css-parse.c
index 28176d14..fe91a933 100644
--- a/source/html/css-parse.c
+++ b/source/html/css-parse.c
@@ -408,19 +408,20 @@ static struct value *parse_value(struct lexbuf *buf)
static struct value *parse_value_list(struct lexbuf *buf)
{
- struct value *v, *vv;
+ struct value *head, *tail;
- vv = NULL;
+ head = tail = NULL;
while (buf->lookahead != '}' && buf->lookahead != ';' && buf->lookahead != '!' &&
buf->lookahead != ')' && buf->lookahead != EOF)
{
- v = parse_value(buf);
- v->next = vv;
- vv = v;
+ if (!head)
+ head = tail = parse_value(buf);
+ else
+ tail = tail->next = parse_value(buf);
}
- return vv;
+ return head;
}
static struct property *parse_declaration(struct lexbuf *buf)