Skip to content

Commit

Permalink
batman-adv: Fix use of seq_has_overflowed()
Browse files Browse the repository at this point in the history
net-next commit 6d91147 ("batman-adv: Remove uses of return value
of seq_printf") incorrectly changed the overflow occurred return from
-1 to 1.  Change it back so that the test of batadv_write_buffer_text's
return value in batadv_gw_client_seq_print_text works properly.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Feb 22, 2015
1 parent 059a244 commit 92b8391
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/batman-adv/gateway_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ static int batadv_write_buffer_text(struct batadv_priv *bat_priv,
gw_node->bandwidth_down % 10,
gw_node->bandwidth_up / 10,
gw_node->bandwidth_up % 10);
ret = seq_has_overflowed(seq);
ret = seq_has_overflowed(seq) ? -1 : 0;

if (curr_gw)
batadv_gw_node_free_ref(curr_gw);
Expand Down

0 comments on commit 92b8391

Please sign in to comment.