Repository : ssh://git@open-mesh.org/batman-adv
On branch : next
commit 8b3e7b919388fd825d14b9caa751932913ed4ca5 Author: Antonio Quartulli antonio@meshcoding.com Date: Sun Sep 22 20:08:25 2013 +0200
batman-adv: fix usage and declaration of batadv_bandwidth_units
Name in declaration does not reflect the one reporte din the kernel doc. Moreover a variable storing an enum should be of type enum rather than int (this helps the compiler to spott possible mistakes)
Introduced by 0853ec7fafe0a195754454832993c6b35e22b842 ("batman-adv: tvlv - gateway download/upload bandwidth container")
Signed-off-by: Antonio Quartulli antonio@meshcoding.com Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
8b3e7b919388fd825d14b9caa751932913ed4ca5 gateway_common.c | 3 ++- gateway_common.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/gateway_common.c b/gateway_common.c index 07fd877..658ac0e 100644 --- a/gateway_common.c +++ b/gateway_common.c @@ -34,9 +34,10 @@ static bool batadv_parse_gw_bandwidth(struct net_device *net_dev, char *buff, uint32_t *down, uint32_t *up) { - int ret, bw_unit_type = BATADV_BW_UNIT_KBIT; + enum batadv_bandwidth_units bw_unit_type = BATADV_BW_UNIT_KBIT; char *slash_ptr, *tmp_ptr; long ldown, lup; + int ret;
slash_ptr = strchr(buff, '/'); if (slash_ptr) diff --git a/gateway_common.h b/gateway_common.h index f18e8b7..dfc734d 100644 --- a/gateway_common.h +++ b/gateway_common.h @@ -31,7 +31,7 @@ enum batadv_gw_modes { * @BATADV_BW_UNIT_KBIT: unit type kbit * @BATADV_BW_UNIT_MBIT: unit type mbit */ -enum batadv_bandwidth_types { +enum batadv_bandwidth_units { BATADV_BW_UNIT_KBIT, BATADV_BW_UNIT_MBIT, };