From patchwork Mon May 23 08:42:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 96840 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id BD5DBB6FAE for ; Mon, 23 May 2011 18:42:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751436Ab1EWImv (ORCPT ); Mon, 23 May 2011 04:42:51 -0400 Received: from mail-ww0-f44.google.com ([74.125.82.44]:33997 "EHLO mail-ww0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713Ab1EWImu (ORCPT ); Mon, 23 May 2011 04:42:50 -0400 Received: by wwa36 with SMTP id 36so5945908wwa.1 for ; Mon, 23 May 2011 01:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=7vkwAyiuEhjosLbQnxUQ3tZV4d0C/hntIYUU8o/ZKYE=; b=SKIfEwXUlF+LXxdLKUXF73JE+SZKK780x5C6E/sS4u/rz0MRLWOGiREKzRLKM0WQ4L TZzy3JoRoEM+qIMQyUUNllC2klfNZSXxXoEcuwycp5zTMvSDeIwIK159JQdIZxQdMQFl x7dP9+gZs9lmueLTBiTXjKJVr13gQnYqWxkXU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; b=qH+HFN4LuCzxJ+CKGSlMn9bTIueovqR0iwUN5wmag1FJE7dhcbH6ljgRCCPneT/pV5 DAhi8VqnKyh5RgqnRRgUZO0+ZDzyWo3GFE2oz5igsQHl51iYBJIhdCkz3cKa3WSgabM7 HrerjWMcpMR9g82CKZIvw+zR5tMDz3fVklEEk= Received: by 10.216.78.212 with SMTP id g62mr1973506wee.22.1306140169297; Mon, 23 May 2011 01:42:49 -0700 (PDT) Received: from [10.150.51.210] (gw0.net.jmsp.net [212.23.165.14]) by mx.google.com with ESMTPS id m15sm3135481weq.26.2011.05.23.01.42.48 (version=SSLv3 cipher=OTHER); Mon, 23 May 2011 01:42:48 -0700 (PDT) Subject: [PATCH] ipv6: xfrm6: fix dubious code From: Eric Dumazet To: David Miller Cc: netdev Date: Mon, 23 May 2011 10:42:47 +0200 Message-ID: <1306140167.2869.8.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org net/ipv6/xfrm6_tunnel.c: In function ‘xfrm6_tunnel_rcv’: net/ipv6/xfrm6_tunnel.c:244:53: warning: the omitted middle operand in ?: will always be ‘true’, suggest explicit middle operand Signed-off-by: Eric Dumazet --- net/ipv6/xfrm6_tunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index a6770a0..fb9b0c3 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c @@ -241,7 +241,7 @@ static int xfrm6_tunnel_rcv(struct sk_buff *skb) __be32 spi; spi = xfrm6_tunnel_spi_lookup(net, (const xfrm_address_t *)&iph->saddr); - return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi) > 0 ? : 0; + return xfrm6_rcv_spi(skb, IPPROTO_IPV6, spi) > 0 ? 1 : 0; } static int xfrm6_tunnel_err(struct sk_buff *skb, struct inet6_skb_parm *opt,