From 31a6477e702eb480c2cc18ebf1772f67b2b984d3 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 5 Sep 2011 08:27:28 -0400 Subject: 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(). --- composer/e-composer-header-table.c | 7 ++----- 1 file 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 #include #include @@ -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)); -- cgit v1.2.3