cvs commit: src/sys/vfs/ufs

Matthew Dillon dillon at apollo.backplane.com
Tue Aug 24 09:23:34 PDT 2004


:drhodus     2004/08/24 06:52:59 PDT
:
:DragonFly src repository
:
:  Minor cleanups. Make a type usage correction. Remove unneeded cast when
:  using struct bp.
:  
:http://www.dragonflybsd.org/cvsweb/src/sys/vfs/ufs/ufs_vnops.c.diff?r1=1.17&r2=1.18&f=u

    Actually some sort of cast would be appropriate there.  Comparisons
    between typed variables against signed integer constants always lead to
    problems later.  So even though daddr_t is a signed int, it's not
    good programming methodology to assume its signed for special-case
    comparisons.

    The cast to a long was clearly wrong.  I recommend casting the -1 to
    (daddr_t) instead.

					-Matt
					Matthew Dillon 
					<dillon at xxxxxxxxxxxxx>





More information about the Commits mailing list