1
1

Remove all useless checks that size_t is greater or equal to zero.

This commit was SVN r5687.
Этот коммит содержится в:
George Bosilca 2005-05-11 14:19:48 +00:00
родитель e940ab43b8
Коммит 6714dfac4e
4 изменённых файлов: 3 добавлений и 5 удалений

Просмотреть файл

@ -141,7 +141,6 @@ int orte_pointer_array_add(size_t *location, orte_pointer_array_t *table, void *
assert(table->addr != NULL);
assert(table->size > 0);
assert(table->lowest_free >= 0);
assert(table->lowest_free < table->size);
assert(table->number_free > 0);
assert(table->number_free <= table->size);
@ -297,7 +296,6 @@ bool orte_pointer_array_test_and_set_item (orte_pointer_array_t *table,
size_t index, void *value)
{
assert(table != NULL);
assert(index >= 0);
#if 0
ompi_output(0,"orte_pointer_array_test_and_set_item: IN: "

Просмотреть файл

@ -78,7 +78,7 @@ int orte_dps_load(orte_buffer_t *buffer, void *payload,
}
/* check that the payload is there */
if (NULL == payload || bytes_used < 0) {
if (NULL == payload) {
return ORTE_SUCCESS;
}

Просмотреть файл

@ -32,7 +32,7 @@ int orte_dps_pack(orte_buffer_t *buffer, void *src, size_t num_vals,
int rc;
/* check for error */
if (NULL == buffer || NULL == src || num_vals < 0) {
if (NULL == buffer || NULL == src) {
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
return ORTE_ERR_BAD_PARAM;
}

Просмотреть файл

@ -35,7 +35,7 @@ int orte_dps_unpack(orte_buffer_t *buffer, void *dst, size_t *num_vals,
orte_data_type_t local_type;
/* check for error */
if (NULL == buffer || NULL == dst || NULL == num_vals || 0 > *num_vals) {
if (NULL == buffer || NULL == dst || NULL == num_vals) {
ORTE_ERROR_LOG(ORTE_ERR_BAD_PARAM);
return ORTE_ERR_BAD_PARAM;
}