X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/0b106f61ff2b8b7a9f294b4a9cf9ebfedb646afc..7cd7de02fab619939e6665c251b246615ecce96e:/timing.c?ds=sidebyside diff --git a/timing.c b/timing.c index 841d973b..9c2a8787 100644 --- a/timing.c +++ b/timing.c @@ -60,15 +60,9 @@ 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; - } + return memcmp(&a->fn, &b->fn, sizeof(a->fn)); #else if (a->fn < b->fn) return -1;