On Thu, 14 Feb 2008 11:16:18 -0800
Harvey Harrison <[EMAIL PROTECTED]> wrote:
> Original:
> if (++link - ap->pmp_link < ap->nr_pmp_links)
> Next:
> if ((char*)++link - (char *)ap->pmp_link < ap->nr_pmp_links *
> sizeof(*link)) return link;
Ungh.
Why not rewrite it as (untested):
if (++link < ap->pmp_link + ap->nr_pmp_links)
That should be just as efficient and more readable since it
is a simple if (ptr < start + size).
/Christer
-
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html