[libcroco] Canonicalize the spacing around if statements and g_return_* invocations
- From: РуÑлан Ижбулатов <ruslanizhb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libcroco] Canonicalize the spacing around if statements and g_return_* invocations
- Date: Tue, 5 Aug 2014 12:14:44 +0000 (UTC)
commit 563fe9a38e19cd63d3181d9c3773875a0cdb4c2c
Author: РуÑлан Ижбулатов <lrn1986 gmail com>
Date: Tue Aug 5 12:14:13 2014 +0000
Canonicalize the spacing around if statements and g_return_* invocations
src/cr-om-parser.c | 17 +++++++++++++++++
tests/test2-main.c | 1 +
tests/test3-main.c | 1 +
3 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/cr-om-parser.c b/src/cr-om-parser.c
index a19e06a..36a6697 100644
--- a/src/cr-om-parser.c
+++ b/src/cr-om-parser.c
@@ -390,9 +390,12 @@ end_page (CRDocHandler * a_this,
(void) a_pseudo_page;
g_return_if_fail (a_this);
+
ctxtptr = &ctxt;
status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr);
+
g_return_if_fail (status == CR_OK && ctxt);
+
g_return_if_fail (ctxt->cur_stmt
&& ctxt->cur_stmt->type == AT_PAGE_RULE_STMT
&& ctxt->stylesheet);
@@ -455,9 +458,12 @@ end_media (CRDocHandler * a_this, GList * a_media_list)
(void) a_media_list;
g_return_if_fail (a_this);
+
ctxtptr = &ctxt;
status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr);
+
g_return_if_fail (status == CR_OK && ctxt);
+
g_return_if_fail (ctxt
&& ctxt->cur_media_stmt
&& ctxt->cur_media_stmt->type == AT_MEDIA_RULE_STMT
@@ -465,6 +471,7 @@ end_media (CRDocHandler * a_this, GList * a_media_list)
stmts = cr_statement_append (ctxt->stylesheet->statements,
ctxt->cur_media_stmt);
+
if (!stmts) {
cr_statement_destroy (ctxt->cur_media_stmt);
ctxt->cur_media_stmt = NULL;
@@ -496,16 +503,22 @@ import_style (CRDocHandler * a_this,
(void) a_uri_default_ns;
g_return_if_fail (a_this);
+
ctxtptr = &ctxt;
status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr);
+
g_return_if_fail (status == CR_OK && ctxt);
+
g_return_if_fail (ctxt->stylesheet);
uri = cr_string_dup (a_uri) ;
+
if (a_media_list)
media_list = cr_utils_dup_glist_of_cr_string (a_media_list) ;
+
stmt = cr_statement_new_at_import_rule
(ctxt->stylesheet, uri, media_list, NULL);
+
if (!stmt)
goto error;
@@ -571,9 +584,12 @@ end_selector (CRDocHandler * a_this, CRSelector * a_selector_list)
(void) a_selector_list;
g_return_if_fail (a_this);
+
ctxtptr = &ctxt;
status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr);
+
g_return_if_fail (status == CR_OK && ctxt);
+
g_return_if_fail (ctxt->cur_stmt && ctxt->stylesheet);
if (ctxt->cur_stmt) {
@@ -613,6 +629,7 @@ end_selector (CRDocHandler * a_this, CRSelector * a_selector_list)
}
}
+
a_selector_list = NULL; /*keep compiler happy */
}
diff --git a/tests/test2-main.c b/tests/test2-main.c
index 9ce5cc9..2b3ef29 100644
--- a/tests/test2-main.c
+++ b/tests/test2-main.c
@@ -152,6 +152,7 @@ test_import_style (CRDocHandler * a_handler,
}
}
}
+
fprintf (stdout, "******************\n\n");
a_uri = NULL; /*keep compiler happy */
}
diff --git a/tests/test3-main.c b/tests/test3-main.c
index e730e06..db52595 100644
--- a/tests/test3-main.c
+++ b/tests/test3-main.c
@@ -143,6 +143,7 @@ test_import_style (CRDocHandler * a_handler,
}
}
}
+
fprintf (stdout, "******************\n\n");
a_uri = NULL; /*keep compiler happy */
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]