X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/c2eb6cb7db654cc38c996be9c72f0e06e93b1c98..b3e9b21a1cb36230bd1507649ccfb15f66bdd524:/timing.c 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)