From owner-svn-src-all@FreeBSD.ORG Fri Jan 25 11:52:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2322F2E4; Fri, 25 Jan 2013 11:52:57 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F234436B; Fri, 25 Jan 2013 11:52:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id r0PBquli056956; Fri, 25 Jan 2013 11:52:56 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id r0PBquVd056955; Fri, 25 Jan 2013 11:52:56 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201301251152.r0PBquVd056955@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 25 Jan 2013 11:52:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r245905 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jan 2013 11:52:57 -0000 Author: glebius Date: Fri Jan 25 11:52:56 2013 New Revision: 245905 URL: http://svnweb.freebsd.org/changeset/base/245905 Log: In mbuf(9) API length is always integer. Thus, cast mbuf length constants to be integers. Reviewed by: bde Modified: head/sys/sys/mbuf.h Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Fri Jan 25 11:51:28 2013 (r245904) +++ head/sys/sys/mbuf.h Fri Jan 25 11:52:56 2013 (r245905) @@ -52,11 +52,14 @@ * stored. Additionally, it is possible to allocate a separate buffer * externally and attach it to the mbuf in a way similar to that of mbuf * clusters. - */ -#define MLEN (MSIZE - sizeof(struct m_hdr)) /* normal data len */ -#define MHLEN (MLEN - sizeof(struct pkthdr)) /* data len w/pkthdr */ -#define MINCLSIZE (MHLEN + 1) /* smallest amount to put in cluster */ -#define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ + * + * MLEN is data length in a normal mbuf. + * MHLEN is data length in an mbuf with pktheader. + * MINCLSIZE is a smallest amount of data that should be put into cluster. + */ +#define MLEN ((int)(MSIZE - sizeof(struct m_hdr))) +#define MHLEN ((int)(MLEN - sizeof(struct pkthdr))) +#define MINCLSIZE (MHLEN + 1) #ifdef _KERNEL /*-