speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Use correct hash and equality functions.


From: Christopher Brannon
Subject: [PATCH] Use correct hash and equality functions.
Date: Tue, 3 Aug 2010 06:52:30 -0500

The fd_uid hash table created in src/server/speechd.c uses integers
as keys.  Its hashing and equality functions need to be g_int_hash and
g_int_equal, rather than g_str_hash and g_str_equal.
---
 src/server/speechd.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/server/speechd.c b/src/server/speechd.c
index a3c3352..b931fa4 100644
--- a/src/server/speechd.c
+++ b/src/server/speechd.c
@@ -549,7 +549,7 @@ speechd_init()
                                        NULL);
     assert(fd_settings != NULL);
 
-    fd_uid = g_hash_table_new_full(g_str_hash, g_str_equal,
+    fd_uid = g_hash_table_new_full(g_int_hash, g_int_equal,
                                   (GDestroyNotify) spd_free,
                                   (GDestroyNotify) spd_free);
     assert(fd_uid != NULL);
-- 
1.7.2.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]