diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-11 20:09:32 -0400 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 16:15:21 -0400 |
commit | 1a8eaf0733ca754533a03d6cfa4463def2b81ce3 (patch) | |
tree | be806212d9109703e0d5d56708ff2efdf65c3d46 /net/batman-adv/translation-table.c | |
parent | 9563877ea52ea18bb4f1ed724c5e3a39bbbcf60b (diff) |
batman-adv: Prefix hash non-static functions with batadv_
batman-adv can be compiled as part of the kernel instead of an module. In that
case the linker will see all non-static symbols of batman-adv and all other
non-static symbols of the kernel. This could lead to symbol collisions. A
prefix for the batman-adv symbols that defines their private namespace avoids
such a problem.
Reported-by: David Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Diffstat (limited to 'net/batman-adv/translation-table.c')
-rw-r--r-- | net/batman-adv/translation-table.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c index 7324b89bf731..a7cbc915afef 100644 --- a/net/batman-adv/translation-table.c +++ b/net/batman-adv/translation-table.c | |||
@@ -183,7 +183,7 @@ static int tt_local_init(struct bat_priv *bat_priv) | |||
183 | if (bat_priv->tt_local_hash) | 183 | if (bat_priv->tt_local_hash) |
184 | return 0; | 184 | return 0; |
185 | 185 | ||
186 | bat_priv->tt_local_hash = hash_new(1024); | 186 | bat_priv->tt_local_hash = batadv_hash_new(1024); |
187 | 187 | ||
188 | if (!bat_priv->tt_local_hash) | 188 | if (!bat_priv->tt_local_hash) |
189 | return -ENOMEM; | 189 | return -ENOMEM; |
@@ -531,7 +531,7 @@ static void tt_local_table_free(struct bat_priv *bat_priv) | |||
531 | spin_unlock_bh(list_lock); | 531 | spin_unlock_bh(list_lock); |
532 | } | 532 | } |
533 | 533 | ||
534 | hash_destroy(hash); | 534 | batadv_hash_destroy(hash); |
535 | 535 | ||
536 | bat_priv->tt_local_hash = NULL; | 536 | bat_priv->tt_local_hash = NULL; |
537 | } | 537 | } |
@@ -541,7 +541,7 @@ static int tt_global_init(struct bat_priv *bat_priv) | |||
541 | if (bat_priv->tt_global_hash) | 541 | if (bat_priv->tt_global_hash) |
542 | return 0; | 542 | return 0; |
543 | 543 | ||
544 | bat_priv->tt_global_hash = hash_new(1024); | 544 | bat_priv->tt_global_hash = batadv_hash_new(1024); |
545 | 545 | ||
546 | if (!bat_priv->tt_global_hash) | 546 | if (!bat_priv->tt_global_hash) |
547 | return -ENOMEM; | 547 | return -ENOMEM; |
@@ -1031,7 +1031,7 @@ static void tt_global_table_free(struct bat_priv *bat_priv) | |||
1031 | spin_unlock_bh(list_lock); | 1031 | spin_unlock_bh(list_lock); |
1032 | } | 1032 | } |
1033 | 1033 | ||
1034 | hash_destroy(hash); | 1034 | batadv_hash_destroy(hash); |
1035 | 1035 | ||
1036 | bat_priv->tt_global_hash = NULL; | 1036 | bat_priv->tt_global_hash = NULL; |
1037 | } | 1037 | } |