On Tue, May 03, 2011 at 07:43:47AM +0000, Craig Rodrigues wrote:
> Author: rodrigc
> Date: Tue May  3 07:43:47 2011
> New Revision: 221365
> URL: http://svn.freebsd.org/changeset/base/221365

> Log:
>   - Add parentheses around expression to eliminate compiler warning.

> Modified:
>   head/lib/libstand/dosfs.c

> -    d->d_fileno = dd.de.clus[1] << 8 + dd.de.clus[0];
> +    d->d_fileno = (dd.de.clus[1] << 8) + dd.de.clus[0];

This certainly seems an improvement, however not because it avoids a
compiler warning but because the original code was wrong. For some
strange reason, + binds more strongly than <<, so fewer different
d_fileno values were generated than likely intended.

-- 
Jilles Tjoelker
_______________________________________________
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"

Reply via email to