[lkml]   [2006]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    Subjectradix-tree.c:__lookup_slot() dead code removal
    Most of the code suggests that it is valid to insert a NULL item,
    possibly a zero item with pointer cast. However, in __lookup_slot()
    whether or not the slot is found seems to depend on the actual value
    of the item in one special case. But further on it doesn't make any
    difference so to remove some dead code:

    --- a/lib/radix-tree.c 2006-12-03 13:23:00.000000000 +0100
    +++ b/lib/radix-tree.c 2006-12-03 17:57:03.000000000 +0100
    @@ -319,9 +319,6 @@ static inline void **__lookup_slot(struc
    if (index > radix_tree_maxindex(height))
    return NULL;

    - if (height == 0 && root->rnode)
    - return (void **)&root->rnode;
    shift = (height-1) * RADIX_TREE_MAP_SHIFT;
    slot = &root->rnode;

    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: 2006-12-03 18:05    [W:0.018 / U:0.392 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site