From owner-cvs-src@FreeBSD.ORG Fri Nov 3 22:39:36 2006 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0C2216A417; Fri, 3 Nov 2006 22:39:35 +0000 (UTC) (envelope-from rrs@cisco.com) Received: from sj-iport-6.cisco.com (sj-iport-6.cisco.com [171.71.176.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id DC96B43D7C; Fri, 3 Nov 2006 22:39:14 +0000 (GMT) (envelope-from rrs@cisco.com) Received: from sj-dkim-2.cisco.com ([171.71.179.186]) by sj-iport-6.cisco.com with ESMTP; 03 Nov 2006 14:39:14 -0800 X-IronPort-AV: i="4.09,386,1157353200"; d="scan'208"; a="85267593:sNHT50195007" Received: from sj-core-5.cisco.com (sj-core-5.cisco.com [171.71.177.238]) by sj-dkim-2.cisco.com (8.12.11.20060308/8.12.11) with ESMTP id kA3MdEZ3005098; Fri, 3 Nov 2006 14:39:14 -0800 Received: from xbh-sjc-211.amer.cisco.com (xbh-sjc-211.cisco.com [171.70.151.144]) by sj-core-5.cisco.com (8.12.10/8.12.6) with ESMTP id kA3MdEW4006994; Fri, 3 Nov 2006 14:39:14 -0800 (PST) Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 14:39:14 -0800 Received: from [127.0.0.1] ([171.68.225.134]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.1830); Fri, 3 Nov 2006 14:39:13 -0800 Message-ID: <454BC4E9.9080708@cisco.com> Date: Fri, 03 Nov 2006 17:38:33 -0500 From: Randall Stewart User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060223 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ruslan Ermilov References: <200611031948.kA3JmuZ6072620@repoman.freebsd.org> <454BB06E.40202@cisco.com> <454BB5DC.4030903@cisco.com> <200611031703.29182.jhb@freebsd.org> <20061103223016.GA55720@rambler-co.ru> In-Reply-To: <20061103223016.GA55720@rambler-co.ru> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 03 Nov 2006 22:39:13.0960 (UTC) FILETIME=[E3437A80:01C6FF98] DKIM-Signature: a=rsa-sha1; q=dns; l=1102; t=1162593554; x=1163457554; c=relaxed/simple; s=sjdkim2002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rrs@cisco.com; z=From:Randall=20Stewart=20 |Subject:Re=3A=20cvs=20commit=3A=20src/sys/netinet=20sctp_asconf.c; X=v=3Dcisco.com=3B=20h=3Ds3++GMTXezzrfs5qHwjv2yBGZ40=3D; b=wuExRl8MewwNxdDBZtrjV8U/QdeQvS9r4Rg/jg2zO4UfwDBc7OS7fo13gCJLoOZohFRB6pmI IY/DZXc3iN9jjjWJiw51e3MrQCUY57FegsidqzwmxDcut6lS7u/mggoY; Authentication-Results: sj-dkim-2.cisco.com; header.From=rrs@cisco.com; dkim=pass ( sig from cisco.com verified; ); Cc: cvs-src@freebsd.org, Doug Barton , src-committers@freebsd.org, cvs-all@freebsd.org, John Baldwin Subject: Re: cvs commit: src/sys/netinet sctp_asconf.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Nov 2006 22:39:36 -0000 Ruslan Ermilov wrote: > On Fri, Nov 03, 2006 at 05:03:28PM -0500, John Baldwin wrote: > >>On Friday 03 November 2006 16:34, Randall Stewart wrote: >> >>>/src/sys/netinet/sctp_usrreq.c: In function `sctp_optsset': >>>/src/sys/netinet/sctp_usrreq.c:3136: warning: cast from pointer to >>>integer of different size >>> >>> >>>The above one I will have to ask if any one of you can give >>>me a hand.. I am not a sparcy person ;-) and the line is: >>> on_off = (mtod(m, int)); >>> >>>(on_off is declared as a int on_off; a few lines above it). >> >>mtod() returns a pointer. If you want to get an int out of the >>mbuf data, then maybe something like: >> >> on_off = ntohl(*mtod(m, int *))); >> >>is what you want. As it is, you are casting m->m_data (char *) to an int and >>returning the raw value of the data pointer into your int. :) >> > > This is the setsockopt()/getsockopt() backend, so it looks like > no ntohl() is actually necessary. > > yep.. R > Cheers, -- Randall Stewart NSSTG - Cisco Systems Inc. 803-345-0369 803-317-4952 (cell)