Skip to content

Commit

Permalink
[IPV6]: Clear up user copy warning in flowlabel code.
Browse files Browse the repository at this point in the history
We are intentionally ignoring the copy_to_user() value,
make it clear to the compiler too.

Noted by Jeff Garzik.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 30, 2005
1 parent 69f6a0f commit 6c94d36
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions net/ipv6/ip6_flowlabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,10 +535,12 @@ int ipv6_flowlabel_opt(struct sock *sk, char __user *optval, int optlen)
if (err)
goto done;

/* Do not check for fault */
if (!freq.flr_label)
copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,
&fl->label, sizeof(fl->label));
if (!freq.flr_label) {
if (copy_to_user(&((struct in6_flowlabel_req __user *) optval)->flr_label,
&fl->label, sizeof(fl->label))) {
/* Intentionally ignore fault. */
}
}

sfl1->fl = fl;
sfl1->next = np->ipv6_fl_list;
Expand Down

0 comments on commit 6c94d36

Please sign in to comment.