openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/shadow/4.6-r0/shadow-4.6/lib/subordinateio.c
static bool have_range(struct commonio_db* db, const char* owner,
                       unsigned long start, unsigned long count)
{
    const struct subordinate_range* range;
    unsigned long end;

    if (count == 0)
        return false;

    end = start + count - 1;
    range = find_range(db, owner, start);
    while (range)
    {
        unsigned long last;

        last = range->start + range->count - 1;
        if (last >= (start + count - 1))
            return true;

        count = end - last;
        start = last + 1;
        range = find_range(db, owner, start);
    }
    return false;
}
/*
 * have_range: check whether @owner is authorized to use the range
 *             (@start .. @start+@count-1).
 * @db: database to check
 * @owner: owning uid being queried
 * @start: start of range
 * @count: number of uids in range
 *
 * Returns true if @owner is authorized to use the range, false otherwise.
 */
check whether @owner is authorized to use the range
(@start ..

Returns true if @owner is authorized to use the range, false otherwise.
check whether @owner is authorized to use the range ( @start .. Returns true if @owner is authorized to use the range false otherwise .
static bool have_range(struct commonio_db* db, const char* owner,
                       unsigned long start, unsigned long count)
{
    const struct subordinate_range* range;
    unsigned long end;
    if (count == 0)
        return false;
    end = start + count - 1;
    range = find_range(db, owner, start);
    while (range)
    {
        unsigned long last;
        last = range->start + range->count - 1;
        if (last >= (start + count - 1))
            return true;
        count = end - last;
        start = last + 1;
        range = find_range(db, owner, start);
    }
    return false;
}
static bool have_range ( struct commonio_db * db , const char * owner , unsigned long start , unsigned long count ) { const struct subordinate_range * range ; unsigned long end ; if ( count == 0 ) return false ; end = start + count - 1 ; range = find_range ( db , owner , start ) ; while ( range ) { unsigned long last ; last = range -> start + range -> count - 1 ; if ( last >= ( start + count - 1 ) ) return true ; count = end - last ; start = last + 1 ; range = find_range ( db , owner , start ) ; } return false ; }
have_range: check whether @owner is authorized to use the range
             (@start .. @start+@count-1).
have_range : check whether @owner is authorized to use the range ( @start .. @start + @count - 1 ) .