Lines Matching refs:nr
28 static bool uid_range_intersect(UidRange *range, uid_t start, uid_t nr) {
31 return range->start <= start + nr &&
32 range->start + range->nr >= start;
45 if (uid_range_intersect(x, y->start, y->nr)) {
49 end = MAX(x->start + x->nr, y->start + y->nr);
52 x->nr = end - begin;
73 if (x->nr < y->nr)
75 if (x->nr > y->nr)
81 int uid_range_add(UidRange **p, unsigned *n, uid_t start, uid_t nr) {
89 if (nr <= 0)
94 if (uid_range_intersect(x, start, nr)) {
104 end = MAX(x->start + x->nr, start + nr);
107 x->nr = end - begin;
119 x->nr = nr;
129 uid_t start, nr;
154 nr = end - start + 1;
160 nr = 1;
163 return uid_range_add(p, n, start, nr);
179 end = p[i].start + p[i].nr - 1;
204 if (uid >= p[i].start && uid < p[i].start + p[i].nr)