fres_block_spare_capacity *s;
fres_contract_ptr_seq contracts;
- forb_sequence_alloc_buf(contracts, rl->length);
+ if (!forb_sequence_alloc_buf(contracts, rl->length)) {
+ return errno;
+ }
contracts._length = rl->length;
i=0;
/* Initialize optimization */
int i, ret;
CORBA_Environment ev;
- forb_sequence_alloc_buf(vreses, schedulable_contracts->_length);
+ if (!forb_sequence_alloc_buf(vreses, schedulable_contracts->_length)) {
+ return errno;
+ }
vreses._length = 0;
for (i=0; i<schedulable_contracts->_length; i++) {
/* Allocate all the needed memory before doing reservation. If
* there is no enough memory, it has no sense to call resource
* manager. */
- forb_sequence_alloc_buf(commit_ids, rl.length);
- if (!commit_ids._buffer) {
+ if (!forb_sequence_alloc_buf(commit_ids, rl.length)) {
ret = errno;
goto err_free_fcb_contracts;
}
/* Return IDs and delete canceled contracts from out database */
- forb_sequence_alloc_buf(**ids_out, contracts->_length);
- if (!(*ids_out)->_buffer) {
+ if (!forb_sequence_alloc_buf(**ids_out, contracts->_length)) {
ev->major = FORB_EX_NO_MEMORY;
goto err_cancel_contracts;
}