diff --git a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd index a839493932b..ecf244607d1 100644 --- a/src/sage/groups/perm_gps/partn_ref/data_structures.pxd +++ b/src/sage/groups/perm_gps/partn_ref/data_structures.pxd @@ -144,28 +144,28 @@ cdef inline void OP_make_set(OrbitPartition *OP) noexcept: cdef int *int_array = sig_malloc(4*(n+1) * sizeof(int)) if int_array is NULL: raise MemoryError("MemoryError allocating int_array in make_set method") - else: - OP.degree = n + 1 - OP.num_cells = OP.num_cells + 1 - new_parent = int_array - new_rank = int_array + (n + 1) - new_mcr = int_array + (2*n + 2) - new_size = int_array + (3 * n + 3) - - memcpy(new_parent, OP.parent, n * sizeof(int)) - memcpy(new_rank, OP.rank, n * sizeof(int)) - memcpy(new_mcr, OP.mcr, n * sizeof(int)) - memcpy(new_size, OP.size, n * sizeof(int)) - - new_parent[n] = n - new_rank[n] = 0 - new_mcr[n] = n - new_size[n] = 1 - - OP.parent = new_parent - OP.rank = new_rank - OP.mcr = new_mcr - OP.size = new_size + + OP.degree = n + 1 + OP.num_cells = OP.num_cells + 1 + new_parent = int_array + new_rank = int_array + (n + 1) + new_mcr = int_array + (2*n + 2) + new_size = int_array + (3 * n + 3) + + memcpy(new_parent, OP.parent, n * sizeof(int)) + memcpy(new_rank, OP.rank, n * sizeof(int)) + memcpy(new_mcr, OP.mcr, n * sizeof(int)) + memcpy(new_size, OP.size, n * sizeof(int)) + + new_parent[n] = n + new_rank[n] = 0 + new_mcr[n] = n + new_size[n] = 1 + + OP.parent = new_parent + OP.rank = new_rank + OP.mcr = new_mcr + OP.size = new_size cdef inline int OP_merge_list_perm(OrbitPartition *OP, int *gamma) noexcept: """