summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2015-07-28 18:40:22 (GMT)
committer Michael Drake <tlsa@netsurf-browser.org>2015-08-03 21:30:20 (GMT)
commit4155e6fb1e8d85dbc777fa85fb61b745647d6505 (patch)
tree3df14b535d356d39bc2a0a6a523966c44e581859
parent601a2cbbcbd28c4170b453e7bd476adcf1eb1266 (diff)
downloadlibnslayout-4155e6fb1e8d85dbc777fa85fb61b745647d6505.tar.gz
libnslayout-4155e6fb1e8d85dbc777fa85fb61b745647d6505.tar.bz2
Client may pass NULL pointer for its pw.
-rw-r--r--src/layout.c1
-rw-r--r--test/basic-layout-tests.c4
2 files changed, 1 insertions, 4 deletions
diff --git a/src/layout.c b/src/layout.c
index 915475b..b5d74c2 100644
--- a/src/layout.c
+++ b/src/layout.c
@@ -29,7 +29,6 @@ nslayout_error nslayout_layout_create(
assert(css_ctx != NULL);
assert(media != NULL);
assert(cb != NULL);
- assert(pw != NULL);
l = calloc(1, sizeof(nslayout_layout));
if (l == NULL) {
diff --git a/test/basic-layout-tests.c b/test/basic-layout-tests.c
index cdaf5e2..273cdf9 100644
--- a/test/basic-layout-tests.c
+++ b/test/basic-layout-tests.c
@@ -14,8 +14,6 @@
#define UNUSED(x) (void)(x)
#endif
-int pw;
-
static nslayout_error nslayout_test_callback(
nslayout_layout *layout,
void *pw,
@@ -50,7 +48,7 @@ START_TEST (test_nslayout_layout_create_ok)
css_ctx,
&media,
nslayout_test_callback,
- &pw,
+ NULL,
&layout);
fail_unless(error == NSLAYOUT_OK,
"Unable to create layout");