Re: bin/ln & WARNS=5
Giorgos Keramidas <[email protected]> Mon, 15 Jul 2002 14:21:16 +0300
| Newsgroups | gmane.os.freebsd.devel.audit |
|---|---|
| Message-ID | <[email protected]> |
On 2002-07-15 13:17 +0000, Dag-Erling Smorgrav wrote: > Giorgos Keramidas <[email protected]> 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. /me picks up notebook to learn a bit :) What's wrong with sizeof(...)? I thought that style(9) was actually encouraging the use of parentheses for the arguments of sizeof, when it mentioned: Casts and sizeof's are not followed by a space. Note that indent(1) does not understand this rule. - Giorgos To Unsubscribe: send mail to [email protected] with "unsubscribe freebsd-audit" in the body of the message