mirror of
https://github.com/versity/scoutfs.git
synced 2025-12-23 13:35:18 +00:00
Fix kvec overlapping comparison
The comparisons were a bit wrong when comparing overlaping kvec endpoints. We want to compare the starts and ends with the ends and starts, respectively. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -71,8 +71,8 @@ int scoutfs_kvec_memcmp(struct kvec *a, struct kvec *b)
|
||||
int scoutfs_kvec_cmp_overlap(struct kvec *a, struct kvec *b,
|
||||
struct kvec *c, struct kvec *d)
|
||||
{
|
||||
return scoutfs_kvec_memcmp(a, c) < 0 ? -1 :
|
||||
scoutfs_kvec_memcmp(b, d) > 0 ? 1 : 0;
|
||||
return scoutfs_kvec_memcmp(b, c) < 0 ? -1 :
|
||||
scoutfs_kvec_memcmp(a, d) > 0 ? 1 : 0;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user