Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/sys/nfs



David Laight <david%l8s.co.uk@localhost> writes:

> On Wed, Mar 01, 2006 at 06:36:20PM +0000, Christos Zoulas wrote:
>> >
>>                      slp->ns_reclen = recmark & ~0x80000000;
>>                      [...]
>>                         if (slp->ns_reclen > NFS_MAXPACKET
>>                             || slp->ns_reclen <= 0) {
>>  
>> How can slp->ns_reclen be negative? I think that you only care about the
>> 0 case, right?
>
> What if recmark is a 64bit quantity?

recmark is currently unsigned int32.

> Maybe that ought to be &0x7fffffff.
> In any case the compiler might generate better code for the <= case.

Well, I'm not sure what we want to do here.. I already committed
another change to replace the <= by ==.

-- 
  Rui Paulo                     <rpaulo@{NetBSD{,-PT}.org,fnop.net}>




Home | Main Index | Thread Index | Old Index