From 1e592489b152d305a44c3049ab7e263f2be9f6f7 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 16 Jan 2005 00:03:45 +0000 Subject: [project @ 2005-01-16 00:03:45 by jmb] Create interface for duplication and destruction of css_style structs. svn path=/import/netsurf/; revision=1450 --- css/ruleset.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'css/ruleset.c') diff --git a/css/ruleset.c b/css/ruleset.c index c2ea45618..50ed75743 100644 --- a/css/ruleset.c +++ b/css/ruleset.c @@ -483,13 +483,12 @@ void css_add_ruleset(struct content *c, if (!found) { /* not present: construct a new struct css_style */ LOG(("constructing new style")); - style = malloc(sizeof *style); + style = css_duplicate_style(&css_empty_style); if (!style) { /** \todo report to user */ css_free_selector(sel); return; } - memcpy(style, &css_empty_style, sizeof(*style)); sel->style = style; sel->next = n; if (prev) -- cgit v1.2.3