Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/kern
On Sun, Feb 15, 2009 at 03:52:49AM +0000, enami tsugutomo wrote:
> Modified Files:
> src/sys/kern: vfs_syscalls.c
>
> Log Message:
> Simplify the code; we already have a hint to decide which string to copy.
> (And at least gcc generates better code.)
I wouldn't call that simplifying the code. The added code doesn't change
the result and the code is even more unreadable then before IMHO.
I don't like the change before that, either. The meaning of "len != 1) is
obscure. And one has to discover of unstated assumptions to understand
what it possible means. If any of these assumptions are violated in the
future the code will, again, fail in obscure ways. Why don't we use a
check that will be true only if it finds exactly what the author expects.
E.g. (len == 0 && *bp == '/') for matching the the root dir "/".
--chris
Home |
Main Index |
Thread Index |
Old Index