summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-01-24 15:26:51 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2015-01-24 15:26:51 (GMT)
commitcaa5dab33e393c8b15f7b3ef26d374983fcf57df (patch)
tree5eaa7215b1f6b138dcaaa4aa543bb472fa5db0cd
parent0a6114ff58a17b0eca08fcf01f36f2949db65344 (diff)
downloadlibcss-caa5dab33e393c8b15f7b3ef26d374983fcf57df.tar.gz
libcss-caa5dab33e393c8b15f7b3ef26d374983fcf57df.tar.bz2
Use calloc instead of malloc/memset.
-rw-r--r--src/select/select.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/select/select.c b/src/select/select.c
index f6e47a2..92696ff 100644
--- a/src/select/select.c
+++ b/src/select/select.c
@@ -230,12 +230,10 @@ css_error css_select_ctx_create(css_select_ctx **result)
if (result == NULL)
return CSS_BADPARM;
- c = malloc(sizeof(css_select_ctx));
+ c = calloc(sizeof(css_select_ctx), 1);
if (c == NULL)
return CSS_NOMEM;
- memset(c, 0, sizeof(css_select_ctx));
-
error = intern_strings(c);
if (error != CSS_OK) {
free(c);