Date: Fri, 23 Feb 2018 13:24:51 -0700 From: Ian Lepore <ian@freebsd.org> To: Warner Losh <imp@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r329866 - head/sys/cam Message-ID: <1519417491.91697.193.camel@freebsd.org> In-Reply-To: <201802231606.w1NG6t45013919@repo.freebsd.org> References: <201802231606.w1NG6t45013919@repo.freebsd.org>
index | next in thread | previous in thread | raw e-mail
On Fri, 2018-02-23 at 16:06 +0000, Warner Losh wrote:
> -static inline int
> +static inline bool
> cam_iosched_has_flagged_work(struct cam_iosched_softc *isc)
> {
> return !!(isc->flags & CAM_IOSCHED_FLAG_WORK_FLAGS);
> }
There should be no need for the ugly !! here, conversion to bool in C99
is like it is for c++, it converts to zero if the expression being
converted has a value of zero, or to one otherwise.
-- Ian
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1519417491.91697.193.camel>
