diff options
author | Sven Eckelmann <sven@narfation.org> | 2012-05-12 02:09:32 +0200 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2012-06-20 22:15:21 +0200 |
commit | 1a8eaf0733ca754533a03d6cfa4463def2b81ce3 (patch) | |
tree | be806212d9109703e0d5d56708ff2efdf65c3d46 /net/batman-adv/bridge_loop_avoidance.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/bridge_loop_avoidance.c')
-rw-r--r-- | net/batman-adv/bridge_loop_avoidance.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c index b0561e338ae5..eb2178951c39 100644 --- a/net/batman-adv/bridge_loop_avoidance.c +++ b/net/batman-adv/bridge_loop_avoidance.c @@ -1166,8 +1166,8 @@ int batadv_bla_init(struct bat_priv *bat_priv) if (bat_priv->claim_hash) return 0; - bat_priv->claim_hash = hash_new(128); - bat_priv->backbone_hash = hash_new(32); + bat_priv->claim_hash = batadv_hash_new(128); + bat_priv->backbone_hash = batadv_hash_new(32); if (!bat_priv->claim_hash || !bat_priv->backbone_hash) return -ENOMEM; @@ -1348,12 +1348,12 @@ void batadv_bla_free(struct bat_priv *bat_priv) if (bat_priv->claim_hash) { bla_purge_claims(bat_priv, primary_if, 1); - hash_destroy(bat_priv->claim_hash); + batadv_hash_destroy(bat_priv->claim_hash); bat_priv->claim_hash = NULL; } if (bat_priv->backbone_hash) { bla_purge_backbone_gw(bat_priv, 1); - hash_destroy(bat_priv->backbone_hash); + batadv_hash_destroy(bat_priv->backbone_hash); bat_priv->backbone_hash = NULL; } if (primary_if) |