projects
/
platform
/
core
/
uifw
/
at-spi2-atk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Release v2.3.1
[platform/core/uifw/at-spi2-atk.git]
/
droute
/
droute-pairhash.c
diff --git
a/droute/droute-pairhash.c
b/droute/droute-pairhash.c
index
20ff491
..
c2f2c29
100644
(file)
--- a/
droute/droute-pairhash.c
+++ b/
droute/droute-pairhash.c
@@
-25,7
+25,7
@@
/*---------------------------------------------------------------------------*/
static guint
/*---------------------------------------------------------------------------*/
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;
{
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;
pair = g_new (StrPair, 1);
pair->one = one;
pair->two = two;
+ return pair;
}
}
-gint
+g
u
int
str_pair_hash (gconstpointer key)
{
StrPair *pair = (StrPair *) key;
guint hash = 0;
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);
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);
}
hash = str_hash (hash, pair->one);
}