openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/libnss-mdns/0.10-r7/nss-mdns-0.10/src/util.c
int timeval_cmp(const struct timeval* a, const struct timeval* b)
{
    assert(a && b);

    if (a->tv_sec < b->tv_sec)
        return -1;

    if (a->tv_sec > b->tv_sec)
        return 1;

    if (a->tv_usec < b->tv_usec)
        return -1;

    if (a->tv_usec > b->tv_usec)
        return 1;

    return 0;
}
/* Compare the two timeval structs and return 0 when equal, negative when a < b,
 * positive otherwse */
Compare the two timeval structs and return 0 when equal, negative when a < b,
positive otherwse
Compare the two timeval structs and return 0 when equal negative when a < b positive otherwse
int timeval_cmp(const struct timeval* a, const struct timeval* b)
{
    assert(a && b);
    if (a->tv_sec < b->tv_sec)
        return -1;
    if (a->tv_sec > b->tv_sec)
        return 1;
    if (a->tv_usec < b->tv_usec)
        return -1;
    if (a->tv_usec > b->tv_usec)
        return 1;
    return 0;
}
int timeval_cmp ( const struct timeval * a , const struct timeval * b ) { assert ( a && b ) ; if ( a -> tv_sec < b -> tv_sec ) return -1 ; if ( a -> tv_sec > b -> tv_sec ) return 1 ; if ( a -> tv_usec < b -> tv_usec ) return -1 ; if ( a -> tv_usec > b -> tv_usec ) return 1 ; return 0 ; }
Compare the two timeval structs and return 0 when equal, negative when a < b,
 positive otherwse
Compare the two timeval structs and return 0 when equal negative when a < b positive otherwse