From b24160aa2cedb773bbd6855144bfaa4aaa449bf4 Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 9 Nov 2000 22:18:17 +0000 Subject: oops thats func not *func 2000-11-09 JP Rosevear * e-dbhash.h: oops thats func not *func * e-dbhash.c (e_dbhash_foreach_key): Memset the data DBT to 0 svn path=/trunk/; revision=6521 --- e-util/ChangeLog | 6 ++++++ e-util/e-dbhash.c | 5 ++--- e-util/e-dbhash.h | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/e-util/ChangeLog b/e-util/ChangeLog index f30bfe7724..a2540582f3 100644 --- a/e-util/ChangeLog +++ b/e-util/ChangeLog @@ -1,3 +1,9 @@ +2000-11-09 JP Rosevear + + * e-dbhash.h: oops thats func not *func + + * e-dbhash.c (e_dbhash_foreach_key): Memset the data DBT to 0 + 2000-11-07 JP Rosevear * Makefile.am: Build e-dbhash.[hc] diff --git a/e-util/e-dbhash.c b/e-util/e-dbhash.c index 57cf8ff9c1..2bcedb8676 100644 --- a/e-util/e-dbhash.c +++ b/e-util/e-dbhash.c @@ -80,8 +80,6 @@ e_dbhash_add (EDbHash *edbh, const gchar *key, const gchar *data) /* Add to database */ db->put (db, &dkey, &ddata, 0); - - g_free (local_hash); } void @@ -104,7 +102,7 @@ e_dbhash_remove (EDbHash *edbh, const char *key) } void -e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc *func, gpointer user_data) +e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data) { DB *db; DBT dkey; @@ -145,6 +143,7 @@ e_dbhash_compare (EDbHash *edbh, const char *key, const char *compare_data) string_to_dbt (key, &dkey); /* Lookup in database */ + memset (&ddata, 0, sizeof (DBT)); db->get (db, &dkey, &ddata, 0); /* Compare */ diff --git a/e-util/e-dbhash.h b/e-util/e-dbhash.h index 11fcdceb80..ac0b28d6a8 100644 --- a/e-util/e-dbhash.h +++ b/e-util/e-dbhash.h @@ -35,7 +35,7 @@ void e_dbhash_add (EDbHash *edbh, const char *key, const char *data); void e_dbhash_remove (EDbHash *edbh, const char *key); EDbHashStatus e_dbhash_compare (EDbHash *edbh, const char *key, const char *compare_data); -void e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc *func, gpointer user_data); +void e_dbhash_foreach_key (EDbHash *edbh, EDbHashFunc func, gpointer user_data); void e_dbhash_write (EDbHash *edbh); -- cgit v1.2.3