Skip site navigation (1)Skip section navigation (2)
Date:      15 Jul 2002 13:17:20 +0200
From:      Dag-Erling Smorgrav <des@ofug.org>
To:        Giorgos Keramidas <keramida@FreeBSD.org>
Cc:        Bruce Evans <bde@zeta.org.au>, freebsd-audit@FreeBSD.org
Subject:   Re: bin/ln & WARNS=5
Message-ID:  <xzp1ya59r5r.fsf@flood.ping.uio.no>
In-Reply-To: <20020715111436.GD50130@hades.hell.gr>
References:  <xzpele59w21.fsf@flood.ping.uio.no> <20020715202126.S40071-100000@gamplex.bde.org> <20020715111436.GD50130@hades.hell.gr>

next in thread | previous in thread | raw e-mail | index | archive | help
Giorgos Keramidas <keramida@FreeBSD.org> writes:
> My intuition was that size_t being unsigned won't require truncation
> of the (int) return value...  But if one wanted to explicitly make
> both a check for (-1) and the return value being less than the size of
> the buffer would the following be more proper?

Looks good to me, apart from the extra parentheses around the argument
to sizeof.

DES
-- 
Dag-Erling Smorgrav - des@ofug.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




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