aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-09-05 20:27:28 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-09-30 00:06:24 +0800
commit31a6477e702eb480c2cc18ebf1772f67b2b984d3 (patch)
tree3daf33a7dc684d9048e1f068310ab3259f5cdfeb
parent3d98af62e582b48fe9c23c8f6e2397911cbce27c (diff)
downloadgsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.tar
gsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.tar.gz
gsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.tar.bz2
gsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.tar.lz
gsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.tar.xz
gsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.tar.zst
gsoc2013-evolution-31a6477e702eb480c2cc18ebf1772f67b2b984d3.zip
Prefer G_VALUE_INIT over memset().
G_VALUE_INIT is new in GLib 2.30. More convenient than zero-filling a statically declared GValue with memset().
-rw-r--r--composer/e-composer-header-table.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 7fe1399dbe..2dd94eb875 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -21,7 +21,6 @@
#include "e-composer-header-table.h"
-#include <string.h>
#include <glib/gi18n-lib.h>
#include <libedataserverui/e-name-selector.h>
@@ -81,10 +80,9 @@ g_value_set_destinations (GValue *value,
EDestination **destinations)
{
GValueArray *value_array;
- GValue element;
+ GValue element = G_VALUE_INIT;
gint ii;
- memset (&element, 0, sizeof (GValue));
g_value_init (&element, E_TYPE_DESTINATION);
/* Preallocate some reasonable number. */
@@ -122,9 +120,8 @@ g_value_set_string_list (GValue *value,
GList *list)
{
GValueArray *value_array;
- GValue element;
+ GValue element = G_VALUE_INIT;
- memset (&element, 0, sizeof (GValue));
g_value_init (&element, G_TYPE_STRING);
value_array = g_value_array_new (g_list_length (list));