Re: Question about dead code int he libibverbs
From: Roland Dreier <hidden>
Date: 2011-08-15 17:48:52
On Sun, Aug 14, 2011 at 4:08 AM, Dotan Barak [off-list ref] wrote:
I read the code of the libibverbs and I noticed the following code:
file: memory.c
function ibv_madvise_range():
The code:
<snip start>
if (node) {
tmp = __mm_prev(node);
if (tmp && node->refcnt == tmp->refcnt)
node = merge_ranges(node, tmp);
}
<snip end>
Seems to be useless, since the values of the variables tmp or node aren't in
use after this code is being executed.But doesn't merge_ranges() have side effects? I don't see how this is dead code. I guess we could stop storing the return value of merge_ranges(). - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html