summaryrefslogtreecommitdiff
path: root/css/ruleset.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2005-01-16 00:03:45 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2005-01-16 00:03:45 +0000
commit1e592489b152d305a44c3049ab7e263f2be9f6f7 (patch)
treef357f3664608495d7a041808621ae0a4ca557e63 /css/ruleset.c
parent1487697cb3d69c8eb86b50b441f4c44fe0a0ff12 (diff)
downloadnetsurf-1e592489b152d305a44c3049ab7e263f2be9f6f7.tar.gz
netsurf-1e592489b152d305a44c3049ab7e263f2be9f6f7.tar.bz2
[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
Diffstat (limited to 'css/ruleset.c')
-rw-r--r--css/ruleset.c3
1 files changed, 1 insertions, 2 deletions
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)