spec file, manifest and gbs.conf adapted for Tizen
[platform/core/uifw/at-spi2-atk.git] / droute / droute-pairhash.c
index 20ff491..c2f2c29 100644 (file)
@@ -25,7 +25,7 @@
 /*---------------------------------------------------------------------------*/
 
 static guint
-str_hash (guint32 h, const signed char *p)
+str_hash (guint32 h, const char *p)
 {
   for (p += 1; *p != '\0'; p++)
       h = (h << 5) - h + *p;
@@ -43,18 +43,24 @@ str_pair_new (const gchar *one, const gchar *two)
     pair = g_new (StrPair, 1);
     pair->one = one;
     pair->two = two;
+    return pair;
 }
 
-gint
+guint
 str_pair_hash (gconstpointer key)
 {
     StrPair *pair = (StrPair *) key;
     guint hash = 0;
 
+    /*g_return_val_if_fail (pair      != NULL, 0);
+      g_return_val_if_fail (pair->one != NULL, 0);
+      g_return_val_if_fail (pair->two != NULL, 0);
+    */
+
     if (*(pair->two) != '\0')
       {
         hash = *(pair->two);
-        hash = str_hash (hash, ++(pair->two));
+        hash = str_hash (hash, pair->two);
         hash = str_hash (hash, pair->one);
       }