aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-config.c6
2 files changed, 7 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d81d4567be..c7058167b1 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2002-03-07 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-config.c (config_import_old_signatures): Don't use an
+ uninitialized 'id'.
+
2002-03-07 Radek Doulik <rodo@ximian.com>
* mail-signature-editor.c (mail_signature_editor): set initial
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 2e6d539f93..c8dc7cfa60 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -530,14 +530,13 @@ config_import_old_signatures ()
val = bonobo_config_get_string (config->db, path, NULL);
g_free (path);
if (val && *val) {
-
gint id;
gpointer orig_key, node_val;
if (g_hash_table_lookup_extended (cache, val, &orig_key, &node_val)) {
id = GPOINTER_TO_INT (node_val);
} else {
- g_hash_table_insert (cache, g_strdup (val), GINT_TO_POINTER (id));
+ g_hash_table_insert (cache, g_strdup (val), GINT_TO_POINTER (num));
config_write_imported_signature (val, num, FALSE);
id = num;
num ++;
@@ -556,14 +555,13 @@ config_import_old_signatures ()
path = g_strdup_printf ("/Mail/Accounts/identity_html_signature_%d", i);
val = bonobo_config_get_string (config->db, path, NULL);
if (val && *val) {
-
gint id;
gpointer orig_key, node_val;
if (g_hash_table_lookup_extended (cache, val, &orig_key, &node_val)) {
id = GPOINTER_TO_INT (node_val);
} else {
- g_hash_table_insert (cache, g_strdup (val), GINT_TO_POINTER (id));
+ g_hash_table_insert (cache, g_strdup (val), GINT_TO_POINTER (num));
config_write_imported_signature (val, num, TRUE);
id = num;
num ++;