[lkml]   [2005]   [Apr]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] sched: fix never executed code due to expression always false
    Jesper Juhl wrote:
    > On Fri, 15 Apr 2005, Nick Piggin wrote:
    >>Jesper Juhl wrote:
    >>>There are two expressions in kernel/sched.c that are always false since they
    >>>test for <0 but the result of the expression is unsigned so they will never
    >>>be less than zero. This patch implement the logic that I believe is intended
    >>>without the signedness issue and without the nasty casts.
    >>><disclaimer>patch is compile tested only</disclaimer>
    >>This is not *quite* the intended behaviour. It is OK for prev->timestamp
    >>to be '0 - a bit' and now to be '0 + a bit' in the case of wrapping.
    >>Although considering they're 64-bit values, I'm not sure how much we care.
    > How do you propose to fix this then? As the code is now the expressionsa
    > are always false - should we just remove the them? Or do you have a
    > sensible definition of "a bit" ? or ome other suggestion alltogether?

    Make it a signed comparison?

    SUSE Labs, Novell Inc.

    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-04-15 02:21    [W:0.020 / U:14.220 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site