Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F177768591
D61756.1795242015.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
D61756.1795242015.diff
View Options
diff --git a/sys/dev/xen/gntdev/gntdev.c b/sys/dev/xen/gntdev/gntdev.c
--- a/sys/dev/xen/gntdev/gntdev.c
+++ b/sys/dev/xen/gntdev/gntdev.c
@@ -105,7 +105,8 @@
static int
offset_cmp(struct file_offset_struct *f1, struct file_offset_struct *f2)
{
- return (f1->file_offset - f2->file_offset);
+ return ((f1->file_offset > f2->file_offset) -
+ (f1->file_offset < f2->file_offset));
}
RB_HEAD(file_offset_head, file_offset_struct);
@@ -240,7 +241,8 @@
static int
gref_cmp(struct gntdev_gref *g1, struct gntdev_gref *g2)
{
- return (g1->file_index - g2->file_index);
+ return ((g1->file_index > g2->file_index) -
+ (g1->file_index < g2->file_index));
}
RB_GENERATE_STATIC(gref_tree_head, gntdev_gref, gref_next.tree, gref_cmp);
@@ -485,7 +487,8 @@
static int
gmap_cmp(struct gntdev_gmap *g1, struct gntdev_gmap *g2)
{
- return (g1->file_index - g2->file_index);
+ return ((g1->file_index > g2->file_index) -
+ (g1->file_index < g2->file_index));
}
RB_GENERATE_STATIC(gmap_tree_head, gntdev_gmap, gmap_next.tree, gmap_cmp);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 21, 6:20 AM (6 m, 1 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41870382
Default Alt Text
D61756.1795242015.diff (1 KB)
Attached To
Mode
D61756: xen/gntdev: avoid truncation of comparison functions
Attached
Detach File
Event Timeline