On 3/12/06, Patrick McHardy <[EMAIL PROTECTED]> wrote:
> [IPV4/6]: Fix UFO error propagation
>
> When ufo_append_data fails err is uninitialized, but returned back.
> Strangely gcc doesn't notice it.
>
> Coverity #901 and #902
>
> Signed-off-by: Patrick McHardy <[EMAIL PROTECTED]>
>
> ---
> commit 3a83b01bbd9e0a2becfc427f7866dd2f20f75494
> tree 421450cdd094d6490cfe4b561610c25ff5ca0e22
> parent cbb18ea472603ef2e7fcc0dd21490c22a9c01335
> author Patrick McHardy <[EMAIL PROTECTED]> Mon, 13 Mar 2006 00:09:33 +0100
> committer Patrick McHardy <[EMAIL PROTECTED]> Mon, 13 Mar 2006 00:09:33 +0100
>
> net/ipv4/ip_output.c | 5 +++--
> net/ipv6/ip6_output.c | 5 +++--
> 2 files changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
> index 57d290d..46b0771 100644
> --- a/net/ipv4/ip_output.c
> +++ b/net/ipv4/ip_output.c
> @@ -847,8 +847,9 @@ int ip_append_data(struct sock *sk,
> if (((length > mtu) && (sk->sk_protocol == IPPROTO_UDP)) &&
> (rt->u.dst.dev->features & NETIF_F_UFO)) {
>
> - if(ip_ufo_append_data(sk, getfrag, from, length, hh_len,
> - fragheaderlen, transhdrlen, mtu, flags))
> + if ((err = ip_ufo_append_data(sk, getfrag, from, length,
> hh_len,
> + fragheaderlen, transhdrlen, mtu,
> + flags)))
Ugh, can this be changed to look like:
err = foo();
if (err)
?
- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html