Commit 6a7b2566 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Remove unnecessary null initialization.

parent 0e135129
......@@ -69,7 +69,7 @@ eek_container_real_serialize (EekSerializable *self,
eek_container_parent_serializable_iface->serialize (self, builder);
g_variant_builder_init (&array, G_VARIANT_TYPE("av"));
for (head = priv->children; head; head = g_slist_next (head)) {
for (head = priv->children; head; head = g_list_next (head)) {
GVariant *variant =
eek_serializable_serialize (EEK_SERIALIZABLE(head->data));
g_variant_builder_add (&array, "v", variant);
......@@ -240,10 +240,7 @@ eek_container_class_init (EekContainerClass *klass)
static void
eek_container_init (EekContainer *self)
{
EekContainerPrivate *priv;
priv = self->priv = EEK_CONTAINER_GET_PRIVATE(self);
priv->children = NULL;
self->priv = EEK_CONTAINER_GET_PRIVATE(self);
}
/**
......
......@@ -404,8 +404,6 @@ eek_element_init (EekElement *self)
EekElementPrivate *priv;
priv = self->priv = EEK_ELEMENT_GET_PRIVATE(self);
priv->name = NULL;
memset (&priv->bounds, 0, sizeof priv->bounds);
priv->group = -1;
priv->level = -1;
}
......
......@@ -371,9 +371,7 @@ eek_gtk_keyboard_class_init (EekGtkKeyboardClass *klass)
static void
eek_gtk_keyboard_init (EekGtkKeyboard *self)
{
EekGtkKeyboardPrivate *priv;
priv = self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
self->priv = EEK_GTK_KEYBOARD_GET_PRIVATE(self);
}
/**
......
......@@ -486,10 +486,7 @@ eek_key_init (EekKey *self)
EekKeyPrivate *priv;
priv = self->priv = EEK_KEY_GET_PRIVATE(self);
priv->keycode = 0;
priv->symbol_matrix = eek_symbol_matrix_new (0, 0);
priv->column = priv->row = 0;
priv->oref = 0;
}
/**
......
......@@ -523,11 +523,8 @@ eek_keyboard_init (EekKeyboard *self)
EekKeyboardPrivate *priv;
priv = self->priv = EEK_KEYBOARD_GET_PRIVATE(self);
priv->layout = NULL;
priv->modifier_behavior = EEK_MODIFIER_BEHAVIOR_NONE;
priv->modifiers = 0;
priv->outline_array = g_array_new (FALSE, TRUE, sizeof (EekOutline));
priv->num_lock_mask = 0;
eek_element_set_symbol_index (EEK_ELEMENT(self), 0, 0);
}
......@@ -759,8 +756,6 @@ eek_keyboard_set_modifiers (EekKeyboard *keyboard,
priv->modifiers = modifiers;
set_level_from_modifiers (keyboard);
return priv->modifiers;
}
/**
......
......@@ -208,10 +208,7 @@ eek_keysym_class_init (EekKeysymClass *klass)
static void
eek_keysym_init (EekKeysym *self)
{
EekKeysymPrivate *priv;
priv = self->priv = EEK_KEYSYM_GET_PRIVATE(self);
priv->xkeysym = EEK_INVALID_KEYSYM;
self->priv = EEK_KEYSYM_GET_PRIVATE(self);
}
/**
......
......@@ -485,12 +485,7 @@ eek_section_class_init (EekSectionClass *klass)
static void
eek_section_init (EekSection *self)
{
EekSectionPrivate *priv;
priv = self->priv = EEK_SECTION_GET_PRIVATE (self);
priv->angle = 0;
priv->rows = NULL;
priv->modifiers = 0;
self->priv = EEK_SECTION_GET_PRIVATE (self);
}
/**
......
......@@ -228,11 +228,7 @@ eek_symbol_init (EekSymbol *self)
EekSymbolPrivate *priv;
priv = self->priv = EEK_SYMBOL_GET_PRIVATE(self);
priv->name = NULL;
priv->label = NULL;
priv->icon_name = NULL;
priv->category = EEK_SYMBOL_CATEGORY_UNKNOWN;
priv->modifier_mask = 0;
}
/**
......
......@@ -457,7 +457,6 @@ eek_xkb_layout_init (EekXkbLayout *self)
EekXkbLayoutPrivate *priv;
priv = self->priv = EEK_XKB_LAYOUT_GET_PRIVATE (self);
memset (&priv->names, 0, sizeof priv->names);
priv->display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ());
g_return_if_fail (priv->display);
......
......@@ -676,10 +676,7 @@ eek_xml_layout_class_init (EekXmlLayoutClass *klass)
static void
eek_xml_layout_init (EekXmlLayout *self)
{
EekXmlLayoutPrivate *priv;
priv = self->priv = EEK_XML_LAYOUT_GET_PRIVATE (self);
priv->source = NULL;
self->priv = EEK_XML_LAYOUT_GET_PRIVATE (self);
}
EekLayout *
......
......@@ -98,6 +98,8 @@ void eekboard_context_hide_keyboard (EekboardContext *context,
void eekboard_context_set_group (EekboardContext *context,
gint group,
GCancellable *cancellable);
gint eekboard_context_get_group (EekboardContext *context,
GCancellable *cancellable);
void eekboard_context_press_key (EekboardContext *context,
guint keycode,
GCancellable *cancellable);
......
......@@ -810,7 +810,7 @@ get_keycode_from_gdk_keymap (EekboardClient *client,
return FALSE;
for (i = 0; i < n_keys; i++)
if (keys[i].group == eekboard_context_get_group (client->context))
if (keys[i].group == eekboard_context_get_group (client->context, NULL))
best_match = &keys[i];
*keycode = best_match->keycode;
......
......@@ -231,19 +231,16 @@ server_server_init (ServerServer *server)
{
GError *error;
server->connection = NULL;
error = NULL;
server->introspection_data =
g_dbus_node_info_new_for_xml (introspection_xml, &error);
g_assert (server->introspection_data != NULL);
server->registration_id = 0;
server->context_hash =
g_hash_table_new_full (g_str_hash,
g_str_equal,
(GDestroyNotify)g_free,
(GDestroyNotify)g_object_unref);
server->context_stack = NULL;
}
static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment