'#ifndef DIAGNOSTIC' in nfsclient code looks like a typo

Mikolaj Golub to.my.trociny at gmail.com
Sat Jun 12 21:33:48 UTC 2010


On Sat, 12 Jun 2010 22:40:22 +0300 Kostik Belousov wrote:

 KB> Almost there. According to style(9), the values should be explicitely
 KB> compared with 0, unless the value is of the boolean type. I suggest
 KB> you to change e.g.
 KB> +        KASSERT(uiop->uio_iovcnt == 1 &&
 KB> +                !(uio_uio_resid(uiop) & (DIRBLKSIZ - 1)),
 KB> to
 KB> +        KASSERT(uiop->uio_iovcnt == 1 &&
 KB> +                (uio_uio_resid(uiop) & (DIRBLKSIZ - 1)) == 0,

 KB> and change
 KB> +        KASSERT((tcnp->cn_flags & HASBUF) && (fcnp->cn_flags & HASBUF),
 KB> +                ("nfs_rename: no name"));
 KB> to
 KB> +        KASSERT((tcnp->cn_flags & HASBUF) != 0 && (fcnp->cn_flags & HASBUF) != 0,
 KB> +                ("nfs_rename: no name"));

Updated.

-- 
Mikolaj Golub

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nfs.KASSERT.patch
Type: text/x-patch
Size: 11535 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20100612/16a1c89c/nfs.KASSERT-0001.bin


More information about the freebsd-fs mailing list