[at-spi2-core] Avoid returning uninitialized data for some IPC errors



commit 7cc0c0127ac83356ca9f26e2eb1a20f209a13119
Author: Mike Gorse <mgorse novell com>
Date:   Tue Feb 15 08:17:55 2011 -0600

    Avoid returning uninitialized data for some IPC errors

 atspi/atspi-component.c    |    2 +-
 atspi/atspi-editabletext.c |    2 +-
 atspi/atspi-hyperlink.c    |    4 ++--
 atspi/atspi-text.c         |    4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/atspi/atspi-component.c b/atspi/atspi-component.c
index 3c47ce1..c85e4a0 100644
--- a/atspi/atspi-component.c
+++ b/atspi/atspi-component.c
@@ -310,7 +310,7 @@ atspi_component_set_extents (AtspiComponent *obj,
   dbus_uint32_t d_ctype = ctype;
   DBusMessageIter iter, iter_struct;
   DBusMessage *message, *reply;
-  dbus_bool_t retval;
+  dbus_bool_t retval = FALSE;
   AtspiAccessible *aobj = ATSPI_ACCESSIBLE (obj);
 
   g_return_val_if_fail (obj != NULL, FALSE);
diff --git a/atspi/atspi-editabletext.c b/atspi/atspi-editabletext.c
index bbfb241..153230c 100644
--- a/atspi/atspi-editabletext.c
+++ b/atspi/atspi-editabletext.c
@@ -46,7 +46,7 @@ atspi_editable_text_set_attributes (AtspiEditableText *obj,
 				    GError **error
 {
   dbus_int32_t d_start_pos = start_pos, d_end_pos = end_pos;
-  dbus_bool_t retval;
+  dbus_bool_t retval = FALSE;
 
   cspi_return_val_if_fail (obj != NULL, FALSE);
 
diff --git a/atspi/atspi-hyperlink.c b/atspi/atspi-hyperlink.c
index e64409f..57c4b81 100644
--- a/atspi/atspi-hyperlink.c
+++ b/atspi/atspi-hyperlink.c
@@ -65,7 +65,7 @@ atspi_hyperlink_new (AtspiApplication *app, const gchar *path)
 gint
 atspi_hyperlink_get_n_anchors (AtspiHyperlink *obj, GError **error)
 {
-  dbus_int32_t retval;
+  dbus_int32_t retval = -1;
 
   g_return_val_if_fail (obj != NULL, -1);
 
@@ -206,7 +206,7 @@ atspi_hyperlink_get_end_index (AtspiHyperlink *obj, GError **error)
 gboolean
 atspi_hyperlink_is_valid (AtspiHyperlink *obj, GError **error)
 {
-  dbus_bool_t retval;
+  dbus_bool_t retval = FALSE;
 
   g_return_val_if_fail (obj != NULL, FALSE);
 
diff --git a/atspi/atspi-text.c b/atspi/atspi-text.c
index 13ed363..2b9fa48 100644
--- a/atspi/atspi-text.c
+++ b/atspi/atspi-text.c
@@ -75,7 +75,7 @@ G_DEFINE_BOXED_TYPE (AtspiTextRange, atspi_text_range, atspi_text_range_copy,
 gint
 atspi_text_get_character_count (AtspiText *obj, GError **error)
 {
-  dbus_int32_t retval;
+  dbus_int32_t retval = 0;
 
   g_return_val_if_fail (obj != NULL, -1);
 
@@ -647,7 +647,7 @@ atspi_text_get_bounded_ranges (AtspiText *obj,
 gint
 atspi_text_get_n_selections (AtspiText *obj, GError **error)
 {
-  dbus_int32_t retval;
+  dbus_int32_t retval = 0;
 
   g_return_val_if_fail (obj != NULL, -1);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]