const BindMount *p = a, *q = b;
int d;
+ /* If the paths are not equal, then order prefixes first */
d = path_compare(p->path, q->path);
+ if (d != 0)
+ return d;
- if (d == 0) {
- /* If the paths are equal, check the mode */
- if (p->mode < q->mode)
- return -1;
-
- if (p->mode > q->mode)
- return 1;
+ /* If the paths are equal, check the mode */
+ if (p->mode < q->mode)
+ return -1;
- return 0;
- }
+ if (p->mode > q->mode)
+ return 1;
- /* If the paths are not equal, then order prefixes first */
- return d;
+ return 0;
}
static void drop_duplicates(BindMount *m, unsigned *n) {