Skip to content

Commit

Permalink
ipv6: fix warning in net/ipv6/ip6_flowlabel.c
Browse files Browse the repository at this point in the history
this warning:

  net/ipv6/ip6_flowlabel.c: In function ‘ipv6_flowlabel_opt’:
  net/ipv6/ip6_flowlabel.c:467: warning: ‘err’ may be used uninitialized in this function

triggers because GCC does not recognize the (correct) error flow
between fl_create() and 'err'.

Annotate it.

Signed-off-by: Ingo Molnar <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Ingo Molnar authored and davem330 committed Nov 26, 2008
1 parent dc0a001 commit 55205d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv6/ip6_flowlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ static inline void fl_link(struct ipv6_pinfo *np, struct ipv6_fl_socklist *sfl,

int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
{
int err;
int uninitialized_var(err);
struct net *net = sock_net(sk);
struct ipv6_pinfo *np = inet6_sk(sk);
struct in6_flowlabel_req freq;
Expand Down

0 comments on commit 55205d4

Please sign in to comment.