Aesthetics. Check malloc() status in same sequence as attempted

field allocations.
This commit is contained in:
Bård Skaflestad
2010-08-18 07:07:07 +00:00
parent 2e667bcfee
commit 47abc777e7

View File

@@ -32,8 +32,8 @@ hybsys_allocate_symm(int max_nconn, int nc, int nconn_tot)
new->L = malloc(nc * sizeof *new->L );
new->F1 = malloc(nconn_tot * sizeof *new->F1 );
if ((new->one == NULL) || (new->S == NULL) ||
(new->L == NULL) || (new->F1 == NULL) || (new->r == NULL)) {
if ((new->one == NULL) || (new->r == NULL) || (new->S == NULL) ||
(new->L == NULL) || (new->F1 == NULL)) {
hybsys_free(new);
new = NULL;