[lkml]   [2002]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: bit ops on unsigned long?
    Rusty Russell writes:
    > Richard: 3 bugs in devfs. Particularly note that the memset was
    > bogus. I can't convince myself that your memcpy & memset stuff is
    > right anyway, given that you can ONLY treat them as unsigned longs
    > (ie. bit 31 will be in byte 0 or byte 3, depending on endianness).

    Yes, the memset is bogus because I didn't cast the pointer to a
    char * or void *. The memcpy should be fine, though. And so should
    everything else, because the bitfield array is allocated in 16 byte
    multiples. So there should be no issues with big vs. little endian,
    since memset/memcpy operations are done in blocks of sufficient

    So, really, the only problem is the stupid lack of a cast. Unless you
    noticed some other problem?


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

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