X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=timing.c;h=ffea4e148e1f7bfa612d4786bb56ca94edd9c128;hb=54da9ee07a3334b2fb32995f0af4408e6e9edec8;hp=841d973b16efce5e78b2d7dcf84951b6417084b8;hpb=aba05b7180b39ee51d72b1da867303c002188f2c;p=PuTTY.git diff --git a/timing.c b/timing.c index 841d973b..ffea4e14 100644 --- a/timing.c +++ b/timing.c @@ -60,14 +60,12 @@ static int compare_timers(void *av, void *bv) * Failing that, compare on the other two fields, just so that * we don't get unwanted equality. */ -#ifdef __LCC__ +#if defined(__LCC__) || defined(__clang__) /* lcc won't let us compare function pointers. Legal, but annoying. */ { int c = memcmp(&a->fn, &b->fn, sizeof(a->fn)); - if (c < 0) - return -1; - else if (c > 0) - return +1; + if (c) + return c; } #else if (a->fn < b->fn)