[vala] gdbus: Don't pass null to get_ccode_array_length_type() to fix criticals
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] gdbus: Don't pass null to get_ccode_array_length_type() to fix criticals
- Date: Sun, 4 Nov 2018 09:06:35 +0000 (UTC)
commit 974f5713150b13a657f47e1b6f54135d8328ab01
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sun Nov 4 10:00:01 2018 +0100
gdbus: Don't pass null to get_ccode_array_length_type() to fix criticals
codegen/valagdbusclientmodule.vala | 6 ++----
codegen/valagdbusservermodule.vala | 2 +-
2 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valagdbusclientmodule.vala b/codegen/valagdbusclientmodule.vala
index a0f15b42b..57051b2c4 100644
--- a/codegen/valagdbusclientmodule.vala
+++ b/codegen/valagdbusclientmodule.vala
@@ -800,9 +800,8 @@ public class Vala.GDBusClientModule : GDBusModule {
ccode.add_declaration (get_ccode_name (param.variable_type),
new CCodeVariableDeclarator.zero ("_vala_%s".printf (param.name), default_value_for_type
(param.variable_type, true)));
var array_type = param.variable_type as ArrayType;
- var length_ctype = get_ccode_array_length_type (array_type);
-
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type
(array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
ccode.add_declaration (length_ctype, new
CCodeVariableDeclarator ("_vala_%s_length%d".printf (param.name, dim), new CCodeConstant ("0")));
}
@@ -841,9 +840,8 @@ public class Vala.GDBusClientModule : GDBusModule {
ccode.add_declaration (get_ccode_name (m.return_type), new
CCodeVariableDeclarator.zero ("_result", default_value_for_type (m.return_type, true)));
var array_type = m.return_type as ArrayType;
- var length_ctype = get_ccode_array_length_type (array_type);
-
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type
(array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
ccode.add_declaration (length_ctype, new
CCodeVariableDeclarator ("_result_length%d".printf (dim), new CCodeConstant ("0")));
}
diff --git a/codegen/valagdbusservermodule.vala b/codegen/valagdbusservermodule.vala
index c446ffd0e..904e04502 100644
--- a/codegen/valagdbusservermodule.vala
+++ b/codegen/valagdbusservermodule.vala
@@ -149,8 +149,8 @@ public class Vala.GDBusServerModule : GDBusClientModule {
}
var array_type = param.variable_type as ArrayType;
- var length_ctype = get_ccode_array_length_type (array_type);
if (array_type != null) {
+ var length_ctype = get_ccode_array_length_type (array_type);
for (int dim = 1; dim <= array_type.rank; dim++) {
string length_cname = get_parameter_array_length_cname
(param, dim);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]