lkml.org 
[lkml]   [2002]   [Sep]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [reiserfs-dev] Re: [PATCH] sparc32: wrong type of nlink_t
    Hello!

    I am sorry but yor mailer corrupted the message or something like that
    so I cannot understand what do you mean.

    Ah, I see now. My latest version of a patch does a cast
    this way (yes, I noticed that problem).
    #define REISERFS_LINK_MAX (nlink_t)((((nlink_t) -1) > 0)?~0:((1u<<(sizeof(nlink_t)*8-1))-1))

    Bye,
    Oleg
    On Thu, Sep 05, 2002 at 11:09:12AM -0500, Dave Kleikamp wrote:
    > On Thursday 05 September 2002 04:54, Oleg Drokin wrote:
    >
    > > +/* Find maximal number, that nlink_t can hold. GCC is able to
    > > calculate this + value at compile time, so do not worry about extra
    > > CPU overhead. */ +#define REISERFS_LINK_MAX ((((nlink_t) -1) >> 0)?~0:((1u<<(sizeof(nlink_t)*8-1))-1))
    >
    > Shouldn't this be:
    >
    > #define REISERFS_LINK_MAX ((((nlink_t) -1) >> 0)?(nlink_t) ~0:((1u<<(sizeof(nlink_t)*8-1))-1))
    >
    > if nlink_t is u16, ~0 would still be 0xffffffff (assuming 32 bits)
    > --
    > David Kleikamp
    > IBM Linux Technology Center
    >
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:28    [W:0.022 / U:0.524 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site