summaryrefslogtreecommitdiff
path: root/object.c
diff options
context:
space:
mode:
Diffstat (limited to 'object.c')
-rw-r--r--object.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/object.c b/object.c
index 427e14cae2..cf5931a942 100644
--- a/object.c
+++ b/object.c
@@ -82,7 +82,12 @@ static int compare_object_pointers(const void *a, const void *b)
{
const struct object * const *pa = a;
const struct object * const *pb = b;
- return *pa - *pb;
+ if (*pa == *pb)
+ return 0;
+ else if (*pa < *pb)
+ return -1;
+ else
+ return 1;
}
void set_object_refs(struct object *obj, struct object_refs *refs)