On 23-Oct-01 Peter Wemm wrote: > John Baldwin wrote: > >> Also, one final note about using do { } while(0). If you actually read >> style(9), you will see that you are supposed to use it for compound >> statement > s, >> not just for any macro that happens to be more than one line long. If the >> macro's body is a single statement, it doesn't need the do { } while (0) >> bit. > > It was there so that the macro didn't have a "value". Since you're > changing this so they all have a meaningful return (eg: TUNABLE_STR_FETCH() > did not before) then removing this makes sense.
Fair enough. It was more a side commentary as I've seen random commits that make this mistake on other macros. -- John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/ PGP Key: http://www.baldwin.cx/~john/pgpkey.asc "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message