summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-01-24 15:30:36 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2015-01-24 15:30:36 (GMT)
commit1e421499904495d7d815b996fd7db734c9231913 (patch)
tree10fa2cee3ca01402214fd5557e0226bb82f38c61
parentcaa5dab33e393c8b15f7b3ef26d374983fcf57df (diff)
downloadlibcss-1e421499904495d7d815b996fd7db734c9231913.tar.gz
libcss-1e421499904495d7d815b996fd7db734c9231913.tar.bz2
Use calloc instead of malloc/memset.
-rw-r--r--src/select/computed.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/select/computed.c b/src/select/computed.c
index 713ec34..c94a5c2 100644
--- a/src/select/computed.c
+++ b/src/select/computed.c
@@ -83,12 +83,10 @@ css_error css_computed_style_create(css_computed_style **result)
if (result == NULL)
return CSS_BADPARM;
- s = malloc(sizeof(css_computed_style));
+ s = calloc(sizeof(css_computed_style), 1);
if (s == NULL)
return CSS_NOMEM;
- memset(s, 0, sizeof(css_computed_style));
-
*result = s;
return CSS_OK;