Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Sep 2005 10:32:49 +0200
From:      VANHULLEBUS Yvan <vanhu_bsd@zeninc.net>
To:        freebsd-net@freebsd.org
Subject:   Re: sbspace() / sbappendaddr() problem
Message-ID:  <20050901083249.GA18990@zen.inc>
In-Reply-To: <20050901075442.GA18666@zen.inc>
References:  <20050901075442.GA18666@zen.inc>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 01, 2005 at 09:54:42AM +0200, VANHULLEBUS Yvan wrote:
> Hi all.
> 
[....]
> #define	sbspace(sb) \
>  (ulmin( ( (sb)->sb_hiwat > (sb)->sb_cc ? (sb)->sb_hiwat - (sb)->sb_cc : 0), \
>  (sb)->sb_mbmax > (sb)->sb_mbcnt ? (sb)->sb_mbmax - (sb)->sb_mbcnt : 0)))

Copy/paste error, there is one missing parenthesis, the "good" define is:

#define	sbspace(sb) \
 (ulmin( ( (sb)->sb_hiwat > (sb)->sb_cc ? (sb)->sb_hiwat - (sb)->sb_cc : 0), \
 ((sb)->sb_mbmax > (sb)->sb_mbcnt ? (sb)->sb_mbmax - (sb)->sb_mbcnt : 0)))


Yvan.

-- 
NETASQ - Secure Internet Connectivity
http://www.netasq.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050901083249.GA18990>