fix the comparison return value

This commit is contained in:
Anatol Belski 2014-10-29 11:48:29 +01:00
parent 3a6db1e77a
commit da1d0ee1bd

View File

@ -160,7 +160,7 @@ static int spl_ptr_heap_zval_max_cmp(zval *a, zval *b, zval *object TSRMLS_DC) {
/* exception or call failure */
return 0;
}
return lval > 0 ? 1 : -1;
return lval > 0 ? 1 : (lval < 0 ? -1 : 0);
}
}
@ -184,7 +184,7 @@ static int spl_ptr_heap_zval_min_cmp(zval *a, zval *b, zval *object TSRMLS_DC) {
/* exception or call failure */
return 0;
}
return lval > 0 ? 1 : -1;
return lval > 0 ? 1 : (lval < 0 ? -1 : 0);
}
}
@ -215,7 +215,7 @@ static int spl_ptr_pqueue_zval_cmp(zval *a, zval *b, zval *object TSRMLS_DC) { /
/* exception or call failure */
return 0;
}
return lval > 0 ? 1 : -1;
return lval > 0 ? 1 : (lval < 0 ? -1 : 0);
}
}