Re: [PATCH 1/5]: DCCP Fix use of invalid loss intervals

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

 



On 1/5/07, Eddie Kohler <kohler@xxxxxxxxxxx> wrote:
Ian (catching up slowly slowly), here is a nit as nitty as they come.

This diff seems strange to me, since ~ actually does the same thing on
integers and unsigned integers.  (This code:

     printf("%u %u\n", ~0, ~0U);

will print the same thing twice.)

Perhaps dccplih_interval is a 64-bit number?  In which case you want to
say something like ~0ULL?

Eddie

Printing gives them the same result as you are using a %u mask. If you
do it with a %d mask you will get a different result.

And that is the issue dccp_lih_interval is unsigned 32 bit and ~0 is a
signed number and is large negative and they therefore can't be equal.

Ian
--
Web: http://wand.net.nz/~iam4
Blog: http://imcdnzl.blogspot.com
WAND Network Research Group
-
To unsubscribe from this list: send the line "unsubscribe dccp" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel]     [IETF DCCP]     [Linux Networking]     [Git]     [Security]     [Linux Assembly]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux