On Fri, Oct 10, 2014 at 02:17:43PM +0000, Baptiste Daroussin wrote: > Author: bapt > Date: Fri Oct 10 14:17:42 2014 > New Revision: 272894 > URL: https://svnweb.freebsd.org/changeset/base/272894 > > Log: > Use FreeBSD-bit-checking-style > This appease gcc 4.9 issuing warnings about parentheses > > Differential Revision: https://reviews.freebsd.org/D933 > Reviewed by: marius > > Modified: > head/sys/dev/mc146818/mc146818.c > > Modified: head/sys/dev/mc146818/mc146818.c > ============================================================================== > --- head/sys/dev/mc146818/mc146818.c Fri Oct 10 12:38:53 2014 > (r272893) > +++ head/sys/dev/mc146818/mc146818.c Fri Oct 10 14:17:42 2014 > (r272894) > @@ -77,7 +77,7 @@ mc146818_attach(device_t dev) > } > > mtx_lock_spin(&sc->sc_mtx); > - if (!(*sc->sc_mcread)(dev, MC_REGD) & MC_REGD_VRT) { > + if (((*sc->sc_mcread)(dev, MC_REGD) & MC_REGD_VRT) == 0) { > mtx_unlock_spin(&sc->sc_mtx); > device_printf(dev, "%s: battery low\n", __func__); > return (ENXIO);
This changes the meaning. The old code was parsed as '(!...) & MC_REGD_VRT' which evaluates to constant 0. Probably this was wrong, but your comment doesn't seem to indicate that. The other two changes are fine. Stefan _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"